zzzzming95 commented on code in PR #9905:
URL: https://github.com/apache/iceberg/pull/9905#discussion_r1677119029
##########
orc/src/main/java/org/apache/iceberg/orc/ORCSchemaUtil.java:
##########
@@ -296,24 +304,36 @@ private static TypeDescription buildOrcProjection(
list.elementId(),
list.elementType(),
isRequired && list.isElementRequired(),
- mapping);
+ mapping,
+ config);
orcType = TypeDescription.createList(elementType);
break;
case MAP:
Types.MapType map = (Types.MapType) type;
TypeDescription keyType =
- buildOrcProjection(map.keyId(), map.keyType(), isRequired,
mapping);
+ buildOrcProjection(map.keyId(), map.keyType(), isRequired,
mapping, config);
TypeDescription valueType =
buildOrcProjection(
- map.valueId(), map.valueType(), isRequired &&
map.isValueRequired(), mapping);
+ map.valueId(),
+ map.valueType(),
+ isRequired && map.isValueRequired(),
+ mapping,
+ config);
orcType = TypeDescription.createMap(keyType, valueType);
break;
default:
if (mapping.containsKey(fieldId)) {
TypeDescription originalType = mapping.get(fieldId).type();
Optional<TypeDescription> promotedType = getPromotedType(type,
originalType);
- if (promotedType.isPresent()) {
+ boolean convertTimestampTZ =
+ config.getBoolean(ConfigProperties.ORC_CONVERT_TIMESTAMPTZ,
false);
+
+ if (convertTimestampTZ
+ && type.typeId() == Type.TypeID.TIMESTAMP
Review Comment:
Some of the processing logic here involves more than just the timestamp
type, so maybe an if is more appropriate
--
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]