You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2025/05/21 06:19:41 UTC

(iotdb) branch master updated: Modify the exception and message of wrong 'setConfiguration' Statement in table model (#15541)

This is an automated email from the ASF dual-hosted git repository.

jiangtian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 93e7b57506a Modify the exception and message of wrong 'setConfiguration' Statement in table model (#15541)
93e7b57506a is described below

commit 93e7b57506a17c0628692c8b36da32323a9e7413
Author: shuwenwei <55...@users.noreply.github.com>
AuthorDate: Wed May 21 14:19:36 2025 +0800

    Modify the exception and message of wrong 'setConfiguration' Statement in table model (#15541)
    
    * Modify the exception message of wrong setConfigurationStatement in table model
    
    * modify Exception
---
 .../iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java
index db4ff12d74b..1402eaa4c04 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java
@@ -1556,8 +1556,10 @@ public class AstBuilder extends RelationalSqlBaseVisitor<Node> {
       String key = property.getName().getValue();
       Expression propertyValue = property.getNonDefaultValue();
       if (!propertyValue.getExpressionType().equals(TableExpressionType.STRING_LITERAL)) {
-        throw new IllegalArgumentException(
-            propertyValue.getExpressionType() + " is not supported for 'set configuration'");
+        throw new SemanticException(
+            propertyValue.getExpressionType()
+                + " is not supported for property value of 'set configuration'. "
+                + "Note that the syntax for 'set configuration' in the tree model is not exactly the same as that in the table model.");
       }
       String value = ((StringLiteral) propertyValue).getValue();
       configItems.put(key.trim(), value.trim());