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 2021/07/06 15:11:34 UTC

[GitHub] [hive] marton-bod opened a new pull request #2448: Handle Iceberg queries with partition clauses

marton-bod opened a new pull request #2448:
URL: https://github.com/apache/hive/pull/2448


   Iceberg tables are unpartitioned even when the underlying Iceberg table itself is partitioned. It is non-user-friendly to leak this implementation detail to the user, and let them face a SemanticException saying it's an unpartitioned table. Instead, we should introduce some point at which we throw a unified exception message saying it's an unsupported op.


-- 
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] lcspinter commented on a change in pull request #2448: Handle Iceberg queries with partition clauses

Posted by GitBox <gi...@apache.org>.
lcspinter commented on a change in pull request #2448:
URL: https://github.com/apache/hive/pull/2448#discussion_r666044747



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/drop/AbstractDropPartitionAnalyzer.java
##########
@@ -90,13 +90,14 @@ protected void analyzeCommand(TableName tableName, Map<String, String> partition
         throw se;
       }
     }
+    validateAlterTableType(table, AlterTableType.DROPPARTITION, expectView());

Review comment:
       Is there any particular reason for moving this validation here? 




-- 
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] szlta merged pull request #2448: Handle Iceberg queries with partition clauses

Posted by GitBox <gi...@apache.org>.
szlta merged pull request #2448:
URL: https://github.com/apache/hive/pull/2448


   


-- 
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] lcspinter commented on a change in pull request #2448: Handle Iceberg queries with partition clauses

Posted by GitBox <gi...@apache.org>.
lcspinter commented on a change in pull request #2448:
URL: https://github.com/apache/hive/pull/2448#discussion_r666064232



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/drop/AbstractDropPartitionAnalyzer.java
##########
@@ -90,13 +90,14 @@ protected void analyzeCommand(TableName tableName, Map<String, String> partition
         throw se;
       }
     }
+    validateAlterTableType(table, AlterTableType.DROPPARTITION, expectView());

Review comment:
       Thanks for the explanation.




-- 
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] szlta merged pull request #2448: Handle Iceberg queries with partition clauses

Posted by GitBox <gi...@apache.org>.
szlta merged pull request #2448:
URL: https://github.com/apache/hive/pull/2448


   


-- 
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] szlta merged pull request #2448: Handle Iceberg queries with partition clauses

Posted by GitBox <gi...@apache.org>.
szlta merged pull request #2448:
URL: https://github.com/apache/hive/pull/2448


   


-- 
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] marton-bod commented on a change in pull request #2448: Handle Iceberg queries with partition clauses

Posted by GitBox <gi...@apache.org>.
marton-bod commented on a change in pull request #2448:
URL: https://github.com/apache/hive/pull/2448#discussion_r666052861



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/drop/AbstractDropPartitionAnalyzer.java
##########
@@ -90,13 +90,14 @@ protected void analyzeCommand(TableName tableName, Map<String, String> partition
         throw se;
       }
     }
+    validateAlterTableType(table, AlterTableType.DROPPARTITION, expectView());

Review comment:
       Ah, yes, thanks for asking, I wanted to provide an explanatory comment. So I think the current code flow is not perfect, because `ALTER TABLE tbl DROP PARTITION` commands should be disabled completely for non-native tables (that's what the `validateAlterTableType` checks). 
   
   However, right now the logic which parses and validates the partition clause part of the syntax tree (`ParseUtils.getFullPartitionSpecs`) runs first, therefore if you specify a partition which does not exist, e.g. `ALTER TABLE tbl DROP PARTITION('department'='does-not-exist')` on an Iceberg or HBase or whatever table, then you'll get an exception saying the `partition does not exist` instead of what I think we'd expect, which is `ALTER TABLE DROP PARTITION is not allowed for non-native tables`




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