szlta commented on code in PR #3607:
URL: https://github.com/apache/hive/pull/3607#discussion_r983436133


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergInputFormat.java:
##########
@@ -177,9 +178,19 @@ public boolean shouldSkipCombine(Path path, Configuration 
conf) {
 
   @Override
   public VectorizedSupport.Support[] getSupportedFeatures() {
-    // disabling VectorizedSupport.Support.DECIMAL_64 as Parquet doesn't 
support it, and we have no way of telling
-    // beforehand what kind of file format we're going to hit later
-    return new VectorizedSupport.Support[]{  };
+    throw new UnsupportedOperationException("This overload of 
getSupportedFeatures should never be called");
+  }
+
+  @Override
+  public VectorizedSupport.Support[] getSupportedFeatures(HiveConf hiveConf, 
Properties properties) {
+    // disabling VectorizedSupport.Support.DECIMAL_64 for Parquet as it 
doesn't support it
+    boolean isORCOnly = 
Boolean.parseBoolean(properties.getProperty(HiveIcebergMetaHook.ORC_FILES_ONLY));
+    if (!isORCOnly) {
+      HiveConf.setVar(hiveConf, 
HiveConf.ConfVars.HIVE_VECTORIZED_INPUT_FORMAT_SUPPORTS_ENABLED, "");
+      return new VectorizedSupport.Support[] {};
+    }
+    HiveConf.setVar(hiveConf, 
HiveConf.ConfVars.HIVE_VECTORIZED_INPUT_FORMAT_SUPPORTS_ENABLED, "decimal_64");

Review Comment:
   While in line 189 we do need to set this to empty string to prevent LLAP 
from picking up decimal64 as supported feature in case 
HiveIcebergInputformat.getSupportedFeatures is [] we don't want to set this 
true explicitly here. A user may want to have this disabled, and while the 
Inputformat could support it we don't want to force the usage of this feature.



-- 
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]

Reply via email to