-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-7088] convert avro logical timestamp types correctly #10079
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
[HUDI-7088] convert avro logical timestamp types correctly #10079
Conversation
|
Note to myself: Add tests. |
|
hey @jonvex : can you review the patch |
jonvex
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.
https://mvnrepository.com/artifact/org.apache.spark/spark-core_2.12/3.1.3
https://avro.apache.org/docs/1.10.2/spec.html#Local+timestamp+%28millisecond+precision%29
spark 3.1 and below don't support this. You should use the spark adapter for version specific code
| case _: TimestampMillis | _: TimestampMicros => SchemaType(TimestampType, nullable = false) | ||
| case _: TimestampMillis | _: TimestampMicros | _: LocalTimestampMillis | _: LocalTimestampMicros | ||
| => SchemaType(TimestampType, nullable = false) |
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.
make sure to extend an existing UT to cover this? or start a new one
yihua
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.
@jonvex Is this PR still needed?
yihua
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.
The local timestamp types are fixed by #13711 . Closing this PR.
Change Logs
Fix bug to correct avro logical timestamp conversion to account for local-timestamp (millisecond precision and microsecond precision).
Impact
Spark datasource reads will reflect timestamp types instead of longs for the types fixed.
Risk level (write none, low medium or high below)
Low
Documentation Update
N/A
Contributor's checklist