pvary commented on code in PR #9905: URL: https://github.com/apache/iceberg/pull/9905#discussion_r1694724039
########## 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: Why is this logic is not part of the `getPromotedType` method? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org