-
Notifications
You must be signed in to change notification settings - Fork 58
chore: migrate 15 scalar operators to SQLGlot #1925
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can update your Gemini prompt such that the generated tests always have empty lines between arrange/action/assert blocks? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
# 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be minus 1 because SQL uses 1-based indexing while Pandas uses 0-based
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks!
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
This change contains three commits generated by Gemini CLI tool:
Fixes internal issue 430133370