Skip to content
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

fix: fix -1 offset lookups failing #463

Merged
merged 2 commits into from
Mar 21, 2024
Merged

fix: fix -1 offset lookups failing #463

merged 2 commits into from
Mar 21, 2024

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 March 19, 2024 00:33
@TrevorBergeron TrevorBergeron requested a review from shobsi March 19, 2024 00:33
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Mar 19, 2024
@@ -215,7 +215,7 @@ def test_series___getitem__(scalars_dfs, index_col, key):
def test_series___getitem___with_int_key(scalars_dfs):
col_name = "int64_too"
index_col = "string_col"
key = 2
key = -1
Copy link
Contributor

Choose a reason for hiding this comment

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

can we not parameterize this and test for both test cases and more - {-3, -2, -1, 0, 1, 2, 3}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a few more test cases

bigframes/core/indexers.py Show resolved Hide resolved
@TrevorBergeron TrevorBergeron requested a review from shobsi March 20, 2024 19:25
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: xs Pull request size is extra small. labels Mar 20, 2024
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xl Pull request size is extra large. labels Mar 20, 2024
@shobsi shobsi merged commit 2dfb9c2 into main Mar 21, 2024
15 checks passed
@shobsi shobsi deleted the series_indexer branch March 21, 2024 02:21
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: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants