This is an automated email from the ASF dual-hosted git repository.
rong 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 a60b181a354 Load: Make load SQL option VERIFY can only be set to true
(#12670)
a60b181a354 is described below
commit a60b181a354715d75c8b0f9db2894d4eff99b07e
Author: Steve Yurong Su <[email protected]>
AuthorDate: Wed Jun 5 20:51:31 2024 +0800
Load: Make load SQL option VERIFY can only be set to true (#12670)
---
.../java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
index c0141de41f6..22171c7bd23 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
@@ -1981,7 +1981,10 @@ public class ASTVisitor extends
IoTDBSqlParserBaseVisitor<Statement> {
} else if (ctx.SGLEVEL() != null) {
loadTsFileStatement.setDatabaseLevel(Integer.parseInt(ctx.INTEGER_LITERAL().getText()));
} else if (ctx.VERIFY() != null) {
-
loadTsFileStatement.setVerifySchema(Boolean.parseBoolean(ctx.boolean_literal().getText()));
+ if (Boolean.parseBoolean(ctx.boolean_literal().getText())) {
+ throw new SemanticException("Load option VERIFY can only be set to
true.");
+ }
+ loadTsFileStatement.setVerifySchema(true);
} else {
throw new SemanticException(
String.format(