snazy commented on code in PR #9905:
URL: https://github.com/apache/iceberg/pull/9905#discussion_r1670374109
##########
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:
Guess this deserves a new `case TIMESTAMP`, not an `if` here.
##########
orc/src/main/java/org/apache/iceberg/orc/ORCSchemaUtil.java:
##########
@@ -23,7 +23,9 @@
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
+import org.apache.hadoop.conf.Configuration;
Review Comment:
Wonder whether the "whole `Configuration` spiel" is necessary here. Hadoop
dependencies are already `compileOnly` to eventually get rid of those entirely.
Wouldn't a simple boolean flag do the same thing in this class?
--
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]