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/09/02 23:10:56 UTC

[GitHub] [hive] ayushtkn commented on a diff in pull request #3553: HIVE-26477: `CREATE TABLE LIKE STORED BY ICEBERG` failing with NPE

ayushtkn commented on code in PR #3553:
URL: https://github.com/apache/hive/pull/3553#discussion_r962059266


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -13906,8 +13906,12 @@ ASTNode analyzeCreateTable(
       rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), crtTranTblDesc)));
       break;
 
-    case CTLT: // create table like <tbl_name>
+    case CTLT:// create table like <tbl_name>
 
+      if (handler != null && !handler.supportsCTLT()) {
+        throw new SemanticException("Unsupported operation. " + qualifiedTabName.getTable() +
+            " cannot be created using CTLT syntax. ");

Review Comment:
   Should we have an entry in the ErrorMsg.java for this case. There are couple of similar instanses for unspupported cases like ``TRUNCATE_FOR_NON_MANAGED_TABLE`` & for CTAS as well ``CTAS_LOCATION_NONEMPTY`` we can we have one like ``CTLT_FOR_ICEBERG_TABLE`` for this case?



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