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/07/20 16:08:43 UTC

[GitHub] [hive] kasakrisz opened a new pull request, #3461: HIVE-26417: Iceberg integration: disable update and merge iceberg table when split update is off

kasakrisz opened a new pull request, #3461:
URL: https://github.com/apache/hive/pull/3461

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   1. Separate legacy and split update early version of Update and Merge SemanticAnalyzer into separate classes.
   2. Disable legacy update of iceberg tables. Throw exception.
   3. Remove `HiveIcebergUpdateWriter.java` and `HiveIcebergBufferedDeleteWriter.java`
   
   ### Why are the changes needed?
   Update and Merge of iceberg tables is only supported using split update early feature.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   ```
   mvn test -Dtest.output.overwrite -Dtest=TestIcebergNegativeCliDriver -Dqfile=update_split_update_off.q,merge_split_update_off.q -pl itests/qtest-iceberg -Piceberg -Pitests
   mvn test -Dtest.output.overwrite -Dtest=TestIcebergCliDriver -Dqfile=merge_iceberg_orc.q,merge_iceberg_partitioned_orc.q,update_iceberg_partitioned_orc.q -pl itests/qtest-iceberg -Piceberg -Pitests
   mvn test -Dtest.output.overwrite -DskipSparkTests -Dtest=TestMiniLlapLocalCliDriver -Dqfile=sort_acid.q -pl itests/qtest -Pitests
   ```


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


[GitHub] [hive] kasakrisz merged pull request #3461: HIVE-26417: Iceberg integration: disable update and merge iceberg table when split update is off

Posted by GitBox <gi...@apache.org>.
kasakrisz merged PR #3461:
URL: https://github.com/apache/hive/pull/3461


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


[GitHub] [hive] pvary commented on a diff in pull request #3461: HIVE-26417: Iceberg integration: disable update and merge iceberg table when split update is off

Posted by GitBox <gi...@apache.org>.
pvary commented on code in PR #3461:
URL: https://github.com/apache/hive/pull/3461#discussion_r927419381


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/MergeSemanticAnalyzer.java:
##########
@@ -62,11 +62,10 @@ protected ASTNode getTargetTableNode(ASTNode tree) {
 
   @Override
   public void analyze(ASTNode tree, Table targetTable, ASTNode tableNameNode) throws SemanticException {
-    if (tree.getToken().getType() != HiveParser.TOK_MERGE) {
-      throw new RuntimeException("Asked to parse token " + tree.getName() + " in " +
-          "MergeSemanticAnalyzer");
+    boolean nonNativeAcid = AcidUtils.isNonNativeAcidTable(targetTable);
+    if (nonNativeAcid) {

Review Comment:
   Could we create an automatic way to turn on the appropriate configs when the query is an Iceberg query? Maybe something like `HiveIcebergStorageHandler.fallbackToNonVectorizedModeBasedOnProperties`?
   



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


[GitHub] [hive] kasakrisz commented on a diff in pull request #3461: HIVE-26417: Iceberg integration: disable update and merge iceberg table when split update is off

Posted by GitBox <gi...@apache.org>.
kasakrisz commented on code in PR #3461:
URL: https://github.com/apache/hive/pull/3461#discussion_r927521734


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/MergeSemanticAnalyzer.java:
##########
@@ -62,11 +62,10 @@ protected ASTNode getTargetTableNode(ASTNode tree) {
 
   @Override
   public void analyze(ASTNode tree, Table targetTable, ASTNode tableNameNode) throws SemanticException {
-    if (tree.getToken().getType() != HiveParser.TOK_MERGE) {
-      throw new RuntimeException("Asked to parse token " + tree.getName() + " in " +
-          "MergeSemanticAnalyzer");
+    boolean nonNativeAcid = AcidUtils.isNonNativeAcidTable(targetTable);
+    if (nonNativeAcid) {

Review Comment:
   It is already implemented and used independently from this patch. `HiveIcebergStorageHandler.fallbackToNonVectorizedModeBasedOnProperties` is called when FSOperator "augments the plan"
   https://github.com/apache/hive/blob/4146d220bfc0a29d117676844a4c7021fcc6a30d/ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java#L1612



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