chore: migrate 15 scalar operators to SQLGlot #1925
Merged
chelsea-lin merged 6 commits intomainfrom Jul 22, 2025
Merged
Conversation
sycai
reviewed
Jul 22, 2025
| def test_arctanh(scalar_types_df: bpd.DataFrame, snapshot): | ||
| bf_df = scalar_types_df[["float64_col"]] | ||
| sql = _apply_unary_op(bf_df, ops.arctanh_op, "float64_col") | ||
| snapshot.assert_match(sql, "out.sql") |
Contributor
There was a problem hiding this comment.
Maybe you can update your Gemini prompt such that the generated tests always have empty lines between arrange/action/assert blocks? 😂
Contributor
Author
There was a problem hiding this comment.
These changes were generated by Gemini on the old code (with no empty lines). I missed adding the empty lines when cherry picked these commits. I will keep on eyes that if Gemini can add empty lines for new generated codes. Fixed. Thanks.
f7ad7c6 to
c3e48ac
Compare
sycai
reviewed
Jul 22, 2025
| # Plus 1 because iso day of week uses 1-based indexing | ||
| return sge.Extract( | ||
| this=sge.Identifier(this="DAYOFWEEK"), expression=expr.expr | ||
| ) + sge.convert(1) |
Contributor
There was a problem hiding this comment.
I think it should be minus 1 because SQL uses 1-based indexing while Pandas uses 0-based
Migrated cosh_op, tanh_op, arcsinh_op, arccosh_op, and arctanh_op scalar operators to SQLGlot.
Migrated operators: - abs_op - capitalize_op - ceil_op - date_op - day_op
Migrated operators: - dayofweek_op - dayofyear_op - exp_op - expm1_op - floor_op
c3e48ac to
08158a5
Compare
08158a5 to
d7b2f2e
Compare
sycai
approved these changes
Jul 22, 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.
This change contains three commits generated by Gemini CLI tool:
Fixes internal issue 430133370