Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

TrevorBergeron
Copy link
Contributor

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@TrevorBergeron TrevorBergeron requested review from a team as code owners September 5, 2025 19:44
@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Sep 5, 2025
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Sep 5, 2025
Copy link
Contributor

@sycai sycai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Just a heads-up for @chelsea-lin , we need to have this operator in the SQLGlot compiler too.

Comment on lines 1220 to 1226
lambda arr_vals: agg_compilers.compile_unary_agg(
op.aggregation, typing.cast(ibis_types.Column, arr_vals)
)
if op.aggregation.order_independent
else agg_compilers.compile_ordered_unary_agg(
op.aggregation, typing.cast(ibis_types.Column, arr_vals)
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just use a if-else block here:

casted_x = typing.cast(ibis_types.ArrayValue, x)
if op.aggregation.order_independent:
  return casted_x.reduce(...)
else:
  return casted_x.reduce(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@TrevorBergeron TrevorBergeron requested a review from sycai September 5, 2025 22:16
@TrevorBergeron TrevorBergeron merged commit 8804ada into main Sep 5, 2025
21 of 25 checks passed
@TrevorBergeron TrevorBergeron deleted the string_agg branch September 5, 2025 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants