-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
API, Core: implement types timestamp_ns and timestamptz_ns #8971
Conversation
Helps apache#8657 This change adds field `ChronoUnit unit` to `TimestampType`, such that `TimestampType` now represents four specified types: - `timestamp` (existing) - `timestamptz` (existing) - `timestamp_ns` (new apache#8683) - `timestamptz_ns` (new apache#8683)
3100b82
to
0d9058a
Compare
0d9058a
to
5fd82c2
Compare
I've tracked down the source of the four failing "core-tests" and will push a fix tomorrow. |
Fixing four failing tests caused me to do most of the new type work for Parquet and ORC as well. Please note that the ORC type attributes need an update in the spec, else it isn't possible to correctly convert an ORC timestamp to an Iceberg timestamp. |
api/src/main/java/org/apache/iceberg/transforms/PartitionSpecVisitor.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/iceberg/transforms/Transforms.java
Outdated
Show resolved
Hide resolved
09c1f25
to
1e374c6
Compare
1e374c6
to
cb109a4
Compare
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.
A few high level questions. Don't the Avro and Parquet details need to be updated?
Also, are these changes intended to be backdate into spec version 1 and 2 or part of v3?
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.
Don't the Avro and Parquet details need to be updated?
Yes.
(I'm new to the project.) My original intent here was to create multiple PRs, each with a different scope (API/Core, Avro, ORC, Parquet, Spark/Flink/Hive/etc). However, the cascade of failing tests in this PR suggests that one big change might be necessary. Do you have any feedback on this?
are these changes intended to be backdate into spec version 1 and 2 or part of v3?
These changes affect v3 only.
Lines 184 to 185 in 7c4bdaa
| [v3](#version-3) | **`timestamp_ns`** | Timestamp, nanosecond precision, without timezone | [2] | | |
| [v3](#version-3) | **`timestamptz_ns`** | Timestamp, nanosecond precision, with timezone | [2] | |
Line 1302 in 7c4bdaa
Types `timestamp_ns` and `timestamptz_ns` are added in v3. |
I'm starting to review. Thanks ! |
@jacobmarble can you break this into smaller commits? There are a ton of files changed here and I'm concerned about catching problems with such a large PR. |
I agree with @rdblue For partition stat we had a PR dedicated for spec. |
Happy to split this up. I tried to scope this to API and Core, but the cascade of failing tests led to this. |
Helps #8657
This change is divided into two commits:
This change adds field
ChronoUnit unit
toTimestampType
, such thatTimestampType
now represents four specified types:timestamp
(existing)timestamptz
(existing)timestamp_ns
(added in Spec: add nanosecond timestamp types #8683)timestamptz_ns
(added in Spec: add nanosecond timestamp types #8683)