refactor: Define window column expression type#2081
Conversation
|
|
||
|
|
||
| class ScalarOpCompiler: | ||
| class ExpressionCompiler: |
There was a problem hiding this comment.
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.
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.
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.
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> 🦕