-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25160][SQL]Avro: remove sql configuration spark.sql.avro.outputTimestampType #22151
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
[SPARK-25160][SQL]Avro: remove sql configuration spark.sql.avro.outputTimestampType #22151
Conversation
HyukjinKwon
left a comment
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.
LGTM
|
Test build #94949 has finished for PR 22151 at commit
|
| s"Avro type $avroStruct.") | ||
| } | ||
| val avroFields = avroStruct.getFields | ||
| assert(avroFields.size() == catalystStruct.length) |
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.
Is this check redundant? Why remove it now?
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.
I think he moved this condition above.
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.
Ah, yea, strictly sounds unrelated tho.
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.
Ah, I miss it. :)
| } | ||
|
|
||
| test("Logical type: user specified schema") { | ||
| test("Logical type: user specified read schema") { |
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: Logical type: user specified read schema with different timestamp types.
|
LGTM |
|
Merged to master. |
What changes were proposed in this pull request?
In the PR for supporting logical timestamp types #21935, a SQL configuration spark.sql.avro.outputTimestampType is added, so that user can specify the output timestamp precision they want.
With PR #21847, the output file can be written with user specified types.
So there is no need to have such trivial configuration. Otherwise to make it consistent we need to add configuration for all the Catalyst types that can be converted into different Avro types.
This PR also add a test case for user specified output schema with different timestamp types.
How was this patch tested?
Unit test