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

Added support for ns #1169 #1215

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zaryab-ali
Copy link

@zaryab-ali zaryab-ali commented Oct 2, 2024

@kevinjqliu made the changes suggested in the previous comments and added the test case for the functionality

@zaryab-ali zaryab-ali changed the title made the changes suggested made the changes suggested #1169 Oct 2, 2024
@zaryab-ali zaryab-ali changed the title made the changes suggested #1169 Added support for ns #1169 Oct 2, 2024
Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

Can you add a few more test scenarios?

  • Time64Type with us precision
  • Time64Type with ns precision, _downcast_ns_timestamp_to_us not set
  • Time64Type with ns precision, _downcast_ns_timestamp_to_us is set

I also want to make sure that downcast works for "Time64Type with ns precision". So let's add a test on the read/write path to verify this.

tests/io/test_pyarrow_visitor.py Show resolved Hide resolved
@kevinjqliu kevinjqliu mentioned this pull request Oct 2, 2024
@zaryab-ali
Copy link
Author

zaryab-ali commented Oct 3, 2024

@kevinjqliu i have a few questions about the these test case scenarios

  • the first scenario is already present i think, test_pyarrow_time64_us_to_iceberg function checks with us precision
  • secondly, can you please explain a bit about the test case you want me to write on the read/write path, what file should that be in and what specifically should it test for

@JE-Chen
Copy link
Contributor

JE-Chen commented Oct 7, 2024

You can find some information in my previous PR.
#1206

@kevinjqliu
Copy link
Contributor

  • Time64Type with us precision. This was already supported by the previous code.
  • Time64Type with ns precision, _downcast_ns_timestamp_to_us not set. Should error
  • Time64Type with ns precision, _downcast_ns_timestamp_to_us is set. Should downcast precision to us
  • Able to write pyarrow dataframe with a column with Time64Type with ns precision.

You can use #848 as an example where timestamp downcast was implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants