Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions java/examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
7 changes: 5 additions & 2 deletions java/examples/src/main/java/org/apache/tsfile/TsFileRead.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -97,7 +98,8 @@ public static void main(String[] args) throws IOException {

// 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
Expand All @@ -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);
}
Expand Down