From 82d9ed494922de12ca27f086744d2c7da686ab38 Mon Sep 17 00:00:00 2001 From: Steve Yurong Su Date: Thu, 6 Jun 2024 12:15:31 +0800 Subject: [PATCH 1/2] Load: Make load SQL option VERIFY can only be set to true (A follow-up fix for #12670) --- .../org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java | 2 +- 1 file changed, 1 insertion(+), 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 22171c7bd2309..12ddcf2636c74 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 @@ private void parseLoadFileAttributeClause( } 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); From a2829316d7a16c7824fd6a9a0998677bea394fb3 Mon Sep 17 00:00:00 2001 From: Steve Yurong Su Date: Thu, 6 Jun 2024 14:43:30 +0800 Subject: [PATCH 2/2] Update IoTDBRepairDataIT.java --- .../test/java/org/apache/iotdb/db/it/IoTDBRepairDataIT.java | 3 +-- 1 file changed, 1 insertion(+), 2 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 550b0d7744b0c..84f268ce926ce 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 void testRepairData() { 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");