Skip to content

refactor: fix ops.StrftimeOp, ops.ToDatetimeOp, ops.ToTimestampOp in sqlglot compiler - #2297

Merged
chelsea-lin merged 2 commits into
mainfrom
main_chelsealin_todatelike
Nov 26, 2025
Merged

refactor: fix ops.StrftimeOp, ops.ToDatetimeOp, ops.ToTimestampOp in sqlglot compiler#2297
chelsea-lin merged 2 commits into
mainfrom
main_chelsealin_todatelike

Conversation

@chelsea-lin

Copy link
Copy Markdown
Contributor

This change aims to fix the to_datetime related tests failing in #2248.

Fixes internal issue 417774347 🦕

@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Nov 26, 2025
@chelsea-lin
chelsea-linforce-pushed the main_chelsealin_todatelike branch from 546607a to c99acc9CompareNovember 26, 2025 00:53
@chelsea-lin
chelsea-lin marked this pull request as ready for review November 26, 2025 00:57
@chelsea-lin
chelsea-lin requested review from a teamNovember 26, 2025 00:57
Comment on lines +44 to +45
if expr.dtype != dtypes.INT_DTYPE:
value = sge.Cast(this=value, to=sge.DataType(this="INT64"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Yeah, the logic are same but I just refactored it for more readable, after having these information. Thanks

@chelsea-lin
chelsea-lin merged commit 9e0f70b into mainNov 26, 2025
20 of 25 checks passed
@chelsea-lin
chelsea-lin deleted the main_chelsealin_todatelike branch November 26, 2025 19:26
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-dataframes API.size: mPull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@chelsea-lin@sycai@TrevorBergeron