refactor: enable engine tests for datetime ops#2196
Merged
chelsea-lin merged 2 commits intomainfrom Oct 27, 2025
Merged
Conversation
636578e to
a7fe5c6
Compare
sycai
reviewed
Oct 27, 2025
|
|
||
| # Helpers | ||
| def dayofweek_op_impl(expr: TypedExpr) -> sge.Expression: | ||
| # Adjust the 1-based day-of-week index (from SQL) to a 0-based index. |
Contributor
There was a problem hiding this comment.
This comment does not seem to be relevant any more. Remove it?
| extract_expr = sge.Extract( | ||
| this=sge.Identifier(this="DAYOFWEEK"), expression=expr.expr | ||
| ) | ||
| return sge.Cast( |
Contributor
There was a problem hiding this comment.
We should add a comment above line 68, explaining that:
- The SQL function returns values in the range [1,7] with Sunday as the first day of of the week.
- pandas assumed the week starts on Monday, which is denoted by 0 and ends on Sunday which is denoted by 6
Contributor
Author
There was a problem hiding this comment.
Good points. Fixed.
a7fe5c6 to
ee7be9a
Compare
sycai
approved these changes
Oct 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes internal issue 446726636 🦕