You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2025/05/30 04:28:05 UTC
(iotdb) 05/08: 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.
jackietien pushed a commit to branch rc/2.0.4
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit b564aa4780208699cd15a207c999ae20493ab496
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
(cherry picked from commit 93e7b57506a17c0628692c8b36da32323a9e7413)
---
.../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 d77c0e48841..a70cf803b69 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
@@ -1385,8 +1385,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());