rdblue commented on code in PR #3610:
URL: https://github.com/apache/parquet-java/pull/3610#discussion_r3562367091
##########
parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveType.java:
##########
@@ -578,9 +580,15 @@ public PrimitiveType(
this.decimalMeta = decimalMeta;
if (columnOrder == null) {
- columnOrder = primitive == PrimitiveTypeName.INT96 || originalType ==
OriginalType.INTERVAL
- ? ColumnOrder.undefined()
- : ColumnOrder.typeDefined();
+ if (primitive == PrimitiveTypeName.INT96) {
+ // A plain INT96 is the legacy timestamp encoding; default it to the
chronological order.
+ // An annotated INT96 carries other semantics, so leave its order
undefined.
+ columnOrder = originalType == null ? ColumnOrder.int96TimestampOrder()
: ColumnOrder.undefined();
Review Comment:
I don't think that there are any original types that can be applied to
INT96. We stopped adding them years ago. I think it would be safe to just
return `ColumnOrder.int96TimestampOrder()` without the check. The comment would
be "INT96 is only used for (deprecated) timestamps".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]