You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tsfile.apache.org by ha...@apache.org on 2025/02/08 02:29:54 UTC

(tsfile) branch fix_example_compile_1.1 created (now 5b72606e7)

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

haonan pushed a change to branch fix_example_compile_1.1
in repository https://gitbox.apache.org/repos/asf/tsfile.git


      at 5b72606e7 [To dev/1.1] Fix example compile issue

This branch includes the following new commits:

     new 5b72606e7 [To dev/1.1] Fix example compile issue

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(tsfile) 01/01: [To dev/1.1] Fix example compile issue

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch fix_example_compile_1.1
in repository https://gitbox.apache.org/repos/asf/tsfile.git

commit 5b72606e7dd43736ed832c0be1801427f88f196b
Author: HTHou <ha...@apache.org>
AuthorDate: Sat Feb 8 10:29:37 2025 +0800

    [To dev/1.1] Fix example compile issue
---
 java/examples/pom.xml                                       |  2 --
 .../src/main/java/org/apache/tsfile/TsFileRead.java         | 13 ++++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/java/examples/pom.xml b/java/examples/pom.xml
index 4abd6ecd4..15fd1fa48 100644
--- a/java/examples/pom.xml
+++ b/java/examples/pom.xml
@@ -27,13 +27,11 @@
         <version>1.1.1-8c45afe9-SNAPSHOT</version>
     </parent>
     <artifactId>examples</artifactId>
-    <packaging>pom</packaging>
     <name>TsFile: Java: Examples</name>
     <dependencies>
         <dependency>
             <groupId>ch.qos.logback</groupId>
             <artifactId>logback-classic</artifactId>
-            <version>1.3.13</version>
         </dependency>
         <dependency>
             <groupId>org.apache.tsfile</groupId>
diff --git a/java/examples/src/main/java/org/apache/tsfile/TsFileRead.java b/java/examples/src/main/java/org/apache/tsfile/TsFileRead.java
index 64ef6f99e..cbf941565 100644
--- a/java/examples/src/main/java/org/apache/tsfile/TsFileRead.java
+++ b/java/examples/src/main/java/org/apache/tsfile/TsFileRead.java
@@ -19,6 +19,7 @@
 
 package org.apache.tsfile;
 
+import org.apache.tsfile.enums.TSDataType;
 import org.apache.tsfile.read.TsFileReader;
 import org.apache.tsfile.read.TsFileSequenceReader;
 import org.apache.tsfile.read.common.Path;
@@ -85,19 +86,20 @@ public class TsFileRead {
       paths.add(new Path(DEVICE_1, SENSOR_6, true));
       paths.add(new Path(DEVICE_1, SENSOR_7, true));
 
-      // no filter, should select 1 2 3 4 6 7 8
-      queryAndPrint(paths, readTsFile, null);
+      //      // no filter, should select 1 2 3 4 6 7 8
+      //      queryAndPrint(paths, readTsFile, null);
 
       // time filter : 4 <= time <= 10, should select 4 6 7 8
       IExpression timeFilter =
           BinaryExpression.and(
               new GlobalTimeExpression(TimeFilterApi.gtEq(4L)),
               new GlobalTimeExpression(TimeFilterApi.ltEq(10L)));
-      queryAndPrint(paths, readTsFile, timeFilter);
+      //      queryAndPrint(paths, readTsFile, timeFilter);
 
       // value filter : device_1.sensor_2 <= 20, should select 1 2 4 6 7
       IExpression valueFilter =
-          new SingleSeriesExpression(new Path(DEVICE_1, SENSOR_2, true), ValueFilterApi.ltEq(20L));
+          new SingleSeriesExpression(
+              new Path(DEVICE_1, SENSOR_2, true), ValueFilterApi.ltEq(0, 20L, TSDataType.INT64));
       queryAndPrint(paths, readTsFile, valueFilter);
 
       // time filter : 4 <= time <= 10, value filter : device_1.sensor_3 >= 20, should select 4 7 8
@@ -106,7 +108,8 @@ public class TsFileRead {
               new GlobalTimeExpression(TimeFilterApi.gtEq(4L)),
               new GlobalTimeExpression(TimeFilterApi.ltEq(10L)));
       valueFilter =
-          new SingleSeriesExpression(new Path(DEVICE_1, SENSOR_3, true), ValueFilterApi.gtEq(20L));
+          new SingleSeriesExpression(
+              new Path(DEVICE_1, SENSOR_3, true), ValueFilterApi.gtEq(0, 20L, TSDataType.INT64));
       IExpression finalFilter = BinaryExpression.and(timeFilter, valueFilter);
       queryAndPrint(paths, readTsFile, finalFilter);
     }