You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/02/10 14:03:38 UTC

[GitHub] [druid] LakshSingla commented on a change in pull request #12246: Surface a user friendly error when PARTITIONED BY is omitted

LakshSingla commented on a change in pull request #12246:
URL: https://github.com/apache/druid/pull/12246#discussion_r803706160



##########
File path: sql/src/main/java/org/apache/druid/sql/calcite/parser/DruidSqlInsert.java
##########
@@ -62,10 +68,14 @@ public DruidSqlInsert(
         insertNode.getSource(),
         insertNode.getTargetColumnList()
     );
-    Preconditions.checkNotNull(partitionedBy); // Shouldn't hit due to how the parser is written
+    if (partitionedBy == null) {
+      throw new ParseException("INSERT statements should specify PARTITIONED BY clause explictly");

Review comment:
       Updated the error message. Thanks for the tip. 




-- 
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: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org