Skip to content

refactor: Simplify local arrow data management #1591

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

Merged
merged 4 commits into from
Apr 4, 2025
Merged

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> 🦕

@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 Apr 4, 2025
@TrevorBergeron TrevorBergeron force-pushed the local_storage_df branch 2 times, most recently from b8b6438 to 8d504a5 Compare April 4, 2025 04:09
@TrevorBergeron TrevorBergeron marked this pull request as ready for review April 4, 2025 18:27
@TrevorBergeron TrevorBergeron requested review from a team as code owners April 4, 2025 18:27
@TrevorBergeron TrevorBergeron requested a review from ZehaoXU April 4, 2025 18:27
@TrevorBergeron TrevorBergeron requested review from tswast and sycai and removed request for ZehaoXU April 4, 2025 18:27
total_bytes: int
row_count: int

@staticmethod
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: It feels like @classmethod is a better fit for factory methods like this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, thats true, changed in new revision

# allows directly using values out of a duration arrow array
if isinstance(value, datetime.timedelta):
value = (
(value.days * 3600 * 24) + value.seconds
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we use value.total_seconds() ? It might simplify the expression a bit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TrevorBergeron TrevorBergeron merged commit 9e0b383 into main Apr 4, 2025
22 of 24 checks passed
@TrevorBergeron TrevorBergeron deleted the local_storage_df branch April 4, 2025 21:37
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