-
Notifications
You must be signed in to change notification settings - Fork 60
refactor: Define window column expression type #2081
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
|
||
|
||
class ScalarOpCompiler: | ||
class ExpressionCompiler: |
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.
Do we want to apply the same renaming to the SQLGlot: https://github.com/googleapis/python-bigquery-dataframes/blob/main/bigframes/core/compile/sqlglot/scalar_compiler.py
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.
If it starts compiling analytic expressions then yeah. For now, ScalarOpCompiler is fine, as it only compiles scalar ops right now.
), | ||
window, | ||
bindings={"_observation_count": is_observation}, | ||
lambda x, y: ops.and_op.as_expr(x, y), per_col_does_count |
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.
Instead compiling to Ibis nodes directly, it rewrites the BF expressions at middle of the compiler. The SQLGlot compiler follows the old pattern to write the SQLGlot expressions. What benefits to have the additional conversions to BF expressions here?
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.
No immediate benefit. Later, I'll pull this step out as a modular rewriter, which we can use for the sqlglot compiler as well
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕