marton-bod commented on a change in pull request #1478:
URL: https://github.com/apache/iceberg/pull/1478#discussion_r497488281
##########
File path:
mr/src/main/java/org/apache/iceberg/mr/hive/serde/objectinspector/IcebergObjectInspector.java
##########
@@ -27,12 +27,25 @@
import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo;
import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
import org.apache.iceberg.Schema;
+import org.apache.iceberg.common.DynMethods;
import org.apache.iceberg.types.Type;
import org.apache.iceberg.types.TypeUtil;
import org.apache.iceberg.types.Types;
public final class IcebergObjectInspector extends
TypeUtil.SchemaVisitor<ObjectInspector> {
+ // get the correct inspectors depending on whether we're working with Hive2
or Hive3 dependencies
+ // we need to do this because there is a breaking API change in
Date/TimestampObjectInspector between Hive2 and Hive3
+ private static final DynMethods.StaticMethod DATE_INSPECTOR =
DynMethods.builder("get")
+
.impl("org.apache.iceberg.mr.hive.serde.objectinspector.IcebergDateObjectInspectorHive3",
null)
+ .impl(IcebergDateObjectInspector.class, null)
Review comment:
yeah, good idea to be defensive
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]