-
Notifications
You must be signed in to change notification settings - Fork 342
Add the rest of the _convert_schema_if_needed calls #2300
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Looks like theres one more usage of _convert_schema_if_needed
here
And another usage of pyarrow_to_schema
here
I think we should pass format_version down in both.
I found these by checking the signature changes in #2294
These 3 functions were changed as well, but i double checked them and they are all good.
_pyarrow_to_schema_without_ids
_ConvertToIceberg
_check_pyarrow_schema_compatible
ca92837
to
bf7a5ef
Compare
good call. both instances fixed |
bf7a5ef
to
26b3533
Compare
], | ||
names=["timestamp_ns", "timestamptz_ns"], | ||
|
||
catalog = load_catalog("default", type="in-memory") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit can we use arrow_table_schema_with_nanoseconds_timestamp_precisions
here? its pretty comprehensive
with pytest.raises(NotImplementedError, match="Writing V3 is not yet supported"): | ||
catalog.create_table("ns.table1", schema=table.schema, properties={"format-version": "3"}) | ||
|
||
with pytest.raises(NotImplementedError, match="Writing V3 is not yet supported"): | ||
catalog.create_table("ns.table2", schema=table2.schema, properties={"format-version": "3"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit can we test that the same code that works for v3 doesnt work for v2. something like
with pytest.raises(NotImplementedError, match="..."):
_create_table(session_catalog, identifier, {"format-version": "2"}, schema=table.schema)
Closes #2270
This adds the rest of the _convert_schema_if_needed calls.
Rationale for this change
Are these changes tested?
Are there any user-facing changes?