Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
chelsea-lin merged 2 commits intomainfrommain_chelsealin_todatelike
Nov 26, 2025

Conversation

@chelsea-lin
Copy link
Contributor

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

Fixes internal issue 417774347 🦕

@product-auto-labelproduct-auto-labelbot added size: mPull request size is medium. api: bigqueryIssues related to the googleapis/python-bigquery-dataframes API. labelsNov 26, 2025
@chelsea-linchelsea-linforce-pushed themain_chelsealin_todatelike branch from546607a toc99acc9CompareNovember 26, 2025 00:53
@chelsea-linchelsea-lin marked this pull request as ready for reviewNovember 26, 2025 00:57
@chelsea-linchelsea-lin requested review froma team ascode ownersNovember 26, 2025 00:57
Comment on lines 44 to 45
ifexpr.dtype!=dtypes.INT_DTYPE:
value=sge.Cast(this=value,to=sge.DataType(this="INT64"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this branch? "to_timedelta" only supports int, float and timedelta inputs:

defoutput_type(self,*input_types:dtypes.ExpressionType)->dtypes.ExpressionType:
ifinput_types[0]in (
dtypes.INT_DTYPE,
dtypes.FLOAT_DTYPE,
dtypes.TIMEDELTA_DTYPE,
):
returndtypes.TIMEDELTA_DTYPE
raiseTypeError("expected integer or float input")

Copy link
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-linchelsea-lin merged commit9e0f70b intomainNov 26, 2025
20 of 25 checks passed
@chelsea-linchelsea-lin deleted the main_chelsealin_todatelike branchNovember 26, 2025 19:26
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@sycaisycaisycai approved these changes

Assignees

@TrevorBergeronTrevorBergeron

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@chelsea-lin@sycai@TrevorBergeron

[8]ページ先頭

©2009-2025 Movatter.jp