-
Notifications
You must be signed in to change notification settings - Fork 48
refactor: simplify ArrayValue public interface #82
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
55a7e52
to
454ff45
Compare
454ff45
to
8b7b26b
Compare
bigframes/core/__init__.py
Outdated
table = self._to_ibis_expr( | ||
ordering_mode="order_by", expose_hidden_cols=True, fraction=fraction | ||
) | ||
table = self._to_ibis_expr(expose_hidden_cols=True, fraction=fraction) |
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 know why we were using order_by
mode before?
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 was added mistakenly. "ORDER BY" clauses shouldn't be added at this level.
bigframes/core/__init__.py
Outdated
@@ -624,7 +606,7 @@ def corr_aggregate( | |||
Arguments: | |||
corr_aggregations: left_column_id, right_column_id, output_column_id tuples | |||
""" | |||
table = self._to_ibis_expr(ordering_mode="unordered") | |||
table = self._to_ibis_expr() |
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.
Nit: I worry about default ordering_mode
. Since behavior varies so much across modes, I don't know that there's really an intuitive default. I'd prefer we be explicit.
bigframes/core/__init__.py
Outdated
if sorted: | ||
sql = textwrap.dedent( | ||
f""" | ||
SELECT * EXCEPT ({offsets_id}) |
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.
Let's wrap this in backticks in case we use spaces or some other characters in the column name.
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.
added
bigframes/core/__init__.py
Outdated
table = self._to_ibis_expr(expose_hidden_cols=expose_extra_columns) | ||
sql = self._session.ibis_client.compile(table) # type:ignore | ||
|
||
# DO NOT COMMIT: Make this ordered |
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.
Leftover TODO???
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.
removed
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> 🦕