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

jackietien pushed a commit to branch IOTDB-6243
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 8a0e580027b9eddcabc7a7783d1d1eb8d1fc33b6
Author: JackieTien97 <[email protected]>
AuthorDate: Mon Nov 13 19:17:39 2023 +0800

    add IT
---
 .../db/it/fill/IoTDBFillWithThresholdInMSIT.java   | 39 +++++++++++-----------
 .../org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4   |  2 +-
 2 files changed, 20 insertions(+), 21 deletions(-)

diff --git 
a/integration-test/src/test/java/org/apache/iotdb/db/it/fill/IoTDBFillWithThresholdInMSIT.java
 
b/integration-test/src/test/java/org/apache/iotdb/db/it/fill/IoTDBFillWithThresholdInMSIT.java
index bf425e3bbe9..158ffddf204 100644
--- 
a/integration-test/src/test/java/org/apache/iotdb/db/it/fill/IoTDBFillWithThresholdInMSIT.java
+++ 
b/integration-test/src/test/java/org/apache/iotdb/db/it/fill/IoTDBFillWithThresholdInMSIT.java
@@ -75,17 +75,17 @@ public class IoTDBFillWithThresholdInMSIT {
         Statement statement = connection.createStatement()) {
 
       String[] ans = {
-          "1675223280000,4,3,4.0,4.0,on,false",
-          "1675223340000,5,5,5.0,5.0,on,true",
-          "1675223400000,6,null,6.0,6.0,null,false",
-          "1675223460000,null,null,null,null,null,null",
-          "1675223520000,null,null,null,null,null,null",
-          "1675223580000,null,null,null,null,null,null",
-          "1675223640000,null,null,null,null,null,null",
-          "1675223700000,null,null,null,null,null,null",
-          "1675223760000,7,7,7.0,null,off,false",
-          "1675223820000,null,null,null,null,null,null",
-          "1675223880000,8,8,8.0,null,on,true"
+        "1675223280000,4,3,4.0,4.0,on,false",
+        "1675223340000,5,5,5.0,5.0,on,true",
+        "1675223400000,6,null,6.0,6.0,null,false",
+        "1675223460000,null,null,null,null,null,null",
+        "1675223520000,null,null,null,null,null,null",
+        "1675223580000,null,null,null,null,null,null",
+        "1675223640000,null,null,null,null,null,null",
+        "1675223700000,null,null,null,null,null,null",
+        "1675223760000,7,7,7.0,null,off,false",
+        "1675223820000,null,null,null,null,null,null",
+        "1675223880000,8,8,8.0,null,on,true"
       };
 
       try (ResultSet set =
@@ -160,13 +160,13 @@ public class IoTDBFillWithThresholdInMSIT {
             "1675223340000,5,5,5.0,5.0,on,true",
             "1675223400000,6,5,6.0,6.0,on,false",
             "1675223460000,6,5,6.0,6.0,on,false",
-            "1675223520000,6,5,6.0,6.0,on,false",
-            "1675223580000,6,5,6.0,6.0,on,false",
-            "1675223640000,6,5,6.0,6.0,on,false",
-            "1675223700000,6,5,6.0,6.0,on,false",
-            "1675223760000,7,7,7.0,6.0,off,false",
-            "1675223820000,7,7,7.0,6.0,off,false",
-            "1675223880000,8,8,8.0,6.0,off,false"
+            "1675223520000,6,null,6.0,6.0,null,false",
+            "1675223580000,null,null,null,null,null,null",
+            "1675223640000,null,null,null,null,null,null",
+            "1675223700000,null,null,null,null,null,null",
+            "1675223760000,7,7,7.0,null,off,false",
+            "1675223820000,7,7,7.0,null,off,false",
+            "1675223880000,8,8,8.0,null,on,true"
           };
 
       try (ResultSet set =
@@ -188,8 +188,7 @@ public class IoTDBFillWithThresholdInMSIT {
                   + set.getString("last_value(root.fillTest.d0.s4)")
                   + ","
                   + set.getString("last_value(root.fillTest.d0.s5)");
-          System.out.println("\"" + row + "\",");
-          //          assertEquals(ans[cnt], row);
+          assertEquals(ans[cnt], row);
           cnt++;
         }
         assertEquals(ans.length, cnt);
diff --git 
a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 
b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
index 52be8d99310..1df42ec928d 100644
--- 
a/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
+++ 
b/iotdb-core/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
@@ -725,7 +725,7 @@ sortKey
 
 // ---- Fill Clause
 fillClause
-    : FILL LR_BRACKET (LINEAR | PREVIOUS | constant (COMMA 
interval=DURATION_LITERAL)?) RR_BRACKET
+    : FILL LR_BRACKET (LINEAR | PREVIOUS | constant) (COMMA 
interval=DURATION_LITERAL)? RR_BRACKET
     ;
 
 // ---- Pagination Clause

Reply via email to