fix: describe Parquet schema with coerce_int96#15750
Merged
comphead merged 3 commits intoapache:mainfrom Apr 19, 2025
Merged
Conversation
Contributor
|
@mbutrovich cc |
mbutrovich
requested changes
Apr 17, 2025
Contributor
There was a problem hiding this comment.
This generally LGTM, but there's going to be a conflict with #15723. Depending on which one goes in first, the other will need to be updated, which isn't the end of the world.
Thank you @chenkovsky!
| CREATE EXTERNAL TABLE release.bar STORED AS parquet LOCATION '../../parquet-testing/data/alltypes_plain.parquet'; | ||
|
|
||
|
|
||
| statement ok |
Contributor
There was a problem hiding this comment.
Can we put this test case in parquet.slt like #15723 does?
mbutrovich
approved these changes
Apr 17, 2025
Contributor
|
Maybe a title change too: |
comphead
reviewed
Apr 18, 2025
| file_metadata.schema_descr(), | ||
| file_metadata.key_value_metadata(), | ||
| )?; | ||
| let schema = match coerce_int96 { |
Contributor
There was a problem hiding this comment.
a nit: it might be rewritten more concise ?
let schema = coerce_int96
.and_then(|time_unit| coerce_int96_to_resolution(file_metadata.schema_descr(), &schema, &time_unit).ok())
.unwrap_or(schema);
comphead
approved these changes
Apr 19, 2025
Contributor
comphead
left a comment
There was a problem hiding this comment.
lgtm thanks @chenkovsky and @mbutrovich for review
Contributor
|
Nice |
nirnayroy
pushed a commit
to nirnayroy/datafusion
that referenced
this pull request
May 2, 2025
* fix: parquet coerce_int96 schema * move test to parquet.slt * update based on comphead's suggestion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
datafusion.execution.parquet.coerce_int96is set, timestamp type is still reported as Timestamp(nanoseconds) #15721.Rationale for this change
coerce_int96 is ignored when infer schema.
What changes are included in this PR?
call coerce_int96_to_resolution when fetching schema
Are these changes tested?
UT
Are there any user-facing changes?
No