Skip to content

Conversation

@shobsi
Copy link
Contributor

@shobsi shobsi commented Nov 23, 2023

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 internal issue 312559139 🦕

@shobsi shobsi requested review from a team as code owners November 23, 2023 02:11
@shobsi shobsi requested a review from Genesis929 November 23, 2023 02:11
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Nov 23, 2023
Genesis929
Genesis929 previously approved these changes Nov 27, 2023
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Nov 27, 2023
Comment on lines 684 to 691
return Series(
[
pandas.NA if other[col].isna().any() else (self * other[col]).sum()
for col in other.columns
],
index=other.columns,
name=self.name,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will perform several queries, as each aggregate .any() operation initiates a query. I think we can do this more efficiently.

Copy link
Contributor Author

@shobsi shobsi Nov 29, 2023

Choose a reason for hiding this comment

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

Sent an optimization, PTAL. It doesn't apply to multi-index yet due to b/313747368, left a TODO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in the latest version only the multi-level columns operand implementation is inefficient (which should be a less common use case). Hope we can accept it for now.

@tswast tswast closed this Dec 1, 2025
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.

4 participants