You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/04/22 13:15:28 UTC

[GitHub] [hive] lcspinter commented on a diff in pull request #3236: HIVE-26169: Set non-vectorized mode as default when accessing iceberg tables in avro fileformat

lcspinter commented on code in PR #3236:
URL: https://github.com/apache/hive/pull/3236#discussion_r856217749


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -744,8 +745,17 @@ private String collectColumnAndReplaceDummyValues(ExprNodeDesc node, String foun
     return column;
   }
 
-  private void fallbackToNonVectorizedModeForV2(Properties tableProps) {
-    if ("2".equals(tableProps.get(TableProperties.FORMAT_VERSION))) {
+  /**
+   * If any of the following checks is true we fall back to non vectorized mode:
+   * <ul>
+   *   <li>iceberg format-version is "2"</li>
+   *   <li>fileformat is set to avro</li>
+   * </ul>
+   * @param tableProps table properties, must be not null
+   */
+  private void fallbackToNonVectorizedModeBasedOnProperties(Properties tableProps) {
+    if ("2".equals(tableProps.get(TableProperties.FORMAT_VERSION)) ||
+        FileFormat.AVRO.name().equalsIgnoreCase((String) tableProps.get(TableProperties.DEFAULT_FILE_FORMAT))) {

Review Comment:
   yepp, fixed it.



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org