You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2024/06/05 10:55:13 UTC

(iotdb) 01/01: Load: Make load SQL option VERIFY can only be set to true

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

rong pushed a commit to branch load-ban-verify-false
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit c1d5cda479ed7377cf31c329f334242ffd6ed7e2
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Wed Jun 5 18:55:05 2024 +0800

    Load: Make load SQL option VERIFY can only be set to true
---
 .../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(