Skip to content

[Java] org.apache.tsfile.read.expression.impl is a private package #551

@Inky19

Description

@Inky19

I'm trying to create a value filter to query data in a ts file. From all the examples I could find and a search in the source code, the only way to do this is to use something like in this example:

// 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(1, 20L, TSDataType.INT64));
 queryAndPrint(paths, readTsFile, valueFilter);

This requires importing SingleSeriesExpression from org.apache.tsfile.read.expression.impl. However, this package is not exported and is even defined as a Private-Package in the MANIFEST generated at the end of the file (at least for the tsfile.jar in the maven repo):
Private-Package: org.apache.tsfile.read.expression.impl
This seems to be the expected default behavior of the maven-bundle-plugin since it doesn't export any package with impl in the name (see here in the <Export-Package> point). However, this means that OSGI will not allow me to import this package for my application.

Is this normal? And if so, how can I create a value filter without importing this package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions