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 036d73679c2 Load: Make load SQL option VERIFY can only be set to true
(A follow-up fix for #12670) (#12676)
036d73679c2 is described below
commit 036d73679c20284aaf23f56b631b61e71bab492e
Author: Steve Yurong Su <[email protected]>
AuthorDate: Thu Jun 6 16:15:26 2024 +0800
Load: Make load SQL option VERIFY can only be set to true (A follow-up fix
for #12670) (#12676)
---
.../src/test/java/org/apache/iotdb/db/it/IoTDBRepairDataIT.java | 3 +--
.../java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBRepairDataIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBRepairDataIT.java
index 550b0d7744b..84f268ce926 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBRepairDataIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBRepairDataIT.java
@@ -70,8 +70,7 @@ public class IoTDBRepairDataIT {
statement.execute("CREATE DATABASE root.tesgsg");
statement.execute("CREATE TIMESERIES root.testsg.d1.s1 WITH
DATATYPE=INT32, ENCODING=PLAIN");
File tsfile = generateUnsortedFile();
- statement.execute(
- String.format("load \"%s\" verify=false",
tsfile.getParentFile().getAbsolutePath()));
+ statement.execute(String.format("load \"%s\"",
tsfile.getParentFile().getAbsolutePath()));
Assert.assertFalse(validate(statement));
statement.execute("START REPAIR DATA");
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 22171c7bd23..12ddcf2636c 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,7 @@ public class ASTVisitor extends
IoTDBSqlParserBaseVisitor<Statement> {
} else if (ctx.SGLEVEL() != null) {
loadTsFileStatement.setDatabaseLevel(Integer.parseInt(ctx.INTEGER_LITERAL().getText()));
} else if (ctx.VERIFY() != null) {
- if (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);