8000 refactor: Make window op node support non-unary ops by TrevorBergeron · Pull Request #1295 · googleapis/python-bigquery-dataframes · GitHub 8000
[go: up one dir, main page]

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 January 16, 2025 22:11
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jan 16, 2025
@tswast
Copy link
Collaborator
tswast commented Jan 17, 2025

Looks like we have a couple of failures related to this change.

doctest:

_____________________ [doctest] groupby.GroupBy.expanding ______________________
[gw3] linux -- Python 3.12.0 /tmpfs/src/github/python-bigquery-dataframes/.nox/doctest/bin/python
976 
977         **Examples:**
978 
979             >>> import bigframes.pandas as bpd
980             >>> import numpy as np
981             >>> bpd.options.display.progress_bar = None
982 
983             >>> lst = ['a', 'a', 'c', 'c', 'e']
984             >>> ser = bpd.Series([1, 0, -2, -1, 2], index=lst)
985             >>> ser.groupby(level=0).expanding().min()
UNEXPECTED EXCEPTION: AttributeError("'BooleanColumn' object has no attribute 'astype'")

presubmit:

nox > python -m pip install .
nox > python -m pip install pytest-mock jinja2 pandas-stubs google-cloud-testutils 'pytest<8.0.0dev' tabulate pytest-xdist openpyxl types-setuptools pytest-cov freezegun types-requests types-protobuf asyncmock xarray mypy types-python-dateutil types-tabulate mock polars pytest-retry pytest-timeout pytest-asyncio
nox > mypy bigframes tests/system tests/unit --check-untyped-defs --explicit-package-bases '--exclude="^third_party"'
[bigframes/core/compile/compiled.py:925](https://cs.corp.google.com/piper///depot/google3/bigframes/core/compile/compiled.py?l=925): error: "BooleanValue" has no attribute "astype"  [attr-defined]
Found 1 error in 1 file (checked 297 source files)
nox > Command mypy bigframes tests/system tests/unit --check-untyped-defs --explicit-package-bases '--exclude="^third_party"' failed with exit code 1
nox > Session mypy failed.
nox > Ran multiple sessions:
nox > * lint: success
nox > * lint_setup_py: success
nox > * mypy: failed

if expression.op.skips_nulls:
# Most operations do not count NULL values towards min_periods
per_col_does_count = (column.notnull() for column in inputs)
# all inputs must be non-null for observation to count
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Capitalize the first letter '# All inputs must ....'

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 enabled auto-merge (squash) January 23, 2025 00:19
@TrevorBergeron TrevorBergeron merged commit 9597ba9 into main Jan 23, 2025
21 of 22 checks passed
@TrevorBergeron TrevorBergeron deleted the nonunary_analytic branch January 23, 2025 01:11
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.

3 participants

0