You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/03/13 02:58:07 UTC

[GitHub] [iotdb] HTHou commented on a change in pull request #5207: [IOTDB-2461] Add cpp and sql support for ZIGZAG encoding

HTHou commented on a change in pull request #5207:
URL: https://github.com/apache/iotdb/pull/5207#discussion_r825378475



##########
File path: integration/src/test/java/org/apache/iotdb/db/integration/IoTDBEncodingIT.java
##########
@@ -243,6 +243,62 @@ public void testSetTimeEncoderRegularAndValueEncoderGORILLAOutofOrder() {
     }
   }
 
+  @Test
+  public void testSetTimeEncoderRegularAndValueEncoderZIGZAG() {
+    try (Connection connection =
+            DriverManager.getConnection(
+                Config.IOTDB_URL_PREFIX + "127.0.0.1:6667/", "root", "root");
+        Statement statement = connection.createStatement()) {
+      statement.execute(
+          "CREATE TIMESERIES root.db_0.tab0.salary WITH DATATYPE=INT64,ENCODING=ZIGZAG");
+      statement.execute("insert into root.db_0.tab0(time,salary) values(1,1100)");
+      statement.execute("insert into root.db_0.tab0(time,salary) values(2,1200)");
+      statement.execute("insert into root.db_0.tab0(time,salary) values(3,1300)");
+      statement.execute("insert into root.db_0.tab0(time,salary) values(4,1400)");
+      statement.execute("flush");
+
+      int[] result = new int[] {1100, 1200, 1300, 1400};
+      try (ResultSet resultSet = statement.executeQuery("select * from root.db_0.tab0")) {
+        int index = 0;
+        while (resultSet.next()) {
+          int salary = resultSet.getInt("root.db_0.tab0.salary");
+          assertEquals(result[index], salary);
+          index++;
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace();

Review comment:
       Fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org