Skip to content

Commit

Permalink
feat(mysql): add date_from_parts impl to support epoch api
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Aug 16, 2024
1 parent 792a4a8 commit 4bec42e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ibis/backends/sql/dialects.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ class Generator(TSQL.Generator):
sge.RegexpLike: (
lambda _, e: f"({e.this.sql('mysql')} RLIKE {e.expression.sql('mysql')})"
),
sge.DateFromParts: lambda _,
e: f"STR_TO_DATE(LPAD({e.args['year']}, 4, '0'), LPAD({e.args['month']}, 2, '0'), LPAD({e.args['day']}, 2, '0'), '%Y%m%d')",
}


Expand Down

0 comments on commit 4bec42e

Please sign in to comment.