Skip to content

Commit b564aa4

Browse files
shuwenweiJackieTien97
authored andcommitted
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 93e7b57)
1 parent 0c23210 commit b564aa4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/parser/AstBuilder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,8 +1385,10 @@ public Node visitSetConfigurationStatement(
13851385
String key = property.getName().getValue();
13861386
Expression propertyValue = property.getNonDefaultValue();
13871387
if (!propertyValue.getExpressionType().equals(TableExpressionType.STRING_LITERAL)) {
1388-
throw new IllegalArgumentException(
1389-
propertyValue.getExpressionType() + " is not supported for 'set configuration'");
1388+
throw new SemanticException(
1389+
propertyValue.getExpressionType()
1390+
+ " is not supported for property value of 'set configuration'. "
1391+
+ "Note that the syntax for 'set configuration' in the tree model is not exactly the same as that in the table model.");
13901392
}
13911393
String value = ((StringLiteral) propertyValue).getValue();
13921394
configItems.put(key.trim(), value.trim());

0 commit comments

Comments
 (0)