From 5b72606e7dd43736ed832c0be1801427f88f196b Mon Sep 17 00:00:00 2001 From: HTHou Date: Sat, 8 Feb 2025 10:29:37 +0800 Subject: [PATCH 1/3] [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 @@ 1.1.1-8c45afe9-SNAPSHOT examples - pom TsFile: Java: Examples ch.qos.logback logback-classic - 1.3.13 org.apache.tsfile 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 static void main(String[] args) throws IOException { 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 static void main(String[] args) throws IOException { 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); } From 8a0bb3f69a9616f6242cf640a6ba843d22aa56bb Mon Sep 17 00:00:00 2001 From: HTHou Date: Sat, 8 Feb 2025 10:31:15 +0800 Subject: [PATCH 2/3] [To dev/1.1] Fix example compile issue --- .../src/main/java/org/apache/tsfile/TsFileRead.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 cbf941565..21ba40b66 100644 --- a/java/examples/src/main/java/org/apache/tsfile/TsFileRead.java +++ b/java/examples/src/main/java/org/apache/tsfile/TsFileRead.java @@ -86,15 +86,15 @@ public static void main(String[] args) throws IOException { 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 = From c2690dcb5050a8f6015a3517d6a04aa0d2290105 Mon Sep 17 00:00:00 2001 From: Haonan Date: Sat, 8 Feb 2025 10:44:23 +0800 Subject: [PATCH 3/3] Fix CI --- .github/workflows/code-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index cd8610ef4..5933b4101 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -17,7 +17,7 @@ on: jobs: codecov: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/tsfile' || github.event_name == 'push' steps: