Skip to content

Support readTsFile table function for external TsFiles#17951

Merged
JackieTien97 merged 50 commits into
masterfrom
read_tsfile_table_function
Jun 22, 2026
Merged

Support readTsFile table function for external TsFiles#17951
JackieTien97 merged 50 commits into
masterfrom
read_tsfile_table_function

fix

6385711
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jun 22, 2026 in 2m 33s

Quality Gate failed

Failed conditions
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/read_tsfile/DeviceTaskRunCursor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Package name 'org.apache.iotdb.db.queryengine.plan.relational.function.tvf.read_tsfile' must match pattern '^[a-z]+(\.[a-z][a-z0-9]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7Zg46Ieb9OVCgZTQ2L&open=AZ7Zg46Ieb9OVCgZTQ2L&pullRequest=17951

Check warning on line 52 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ExternalTsFileAggregationScanNode.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Constructor has 22 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXftX8JVNcsmiS90D&open=AZ7PXftX8JVNcsmiS90D&pullRequest=17951

Check warning on line 98 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformSortToStreamSort.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof ExternalTsFileScanNode externaltsfilescannode'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7UoaUsL_w-MbTZgu1k&open=AZ7UoaUsL_w-MbTZgu1k&pullRequest=17951

Check warning on line 737 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "java.util.List.of()" instead.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfw18JVNcsmiS90R&open=AZ7PXfw18JVNcsmiS90R&pullRequest=17951

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/read_tsfile/ExternalTsFileDeviceFilterVisitor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Package name 'org.apache.iotdb.db.queryengine.plan.relational.function.tvf.read_tsfile' must match pattern '^[a-z]+(\.[a-z][a-z0-9]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7Ud-fOpFCIhe324pDQ&open=AZ7Ud-fOpFCIhe324pDQ&pullRequest=17951

Check warning on line 2064 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof ExternalTsFileAggregationScanNode externaltsfileaggregationscannode'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7UoaXyL_w-MbTZgu1t&open=AZ7UoaXyL_w-MbTZgu1t&pullRequest=17951

Check warning on line 154 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ExternalTsFileAggregationScanNode.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 103).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXftX8JVNcsmiS90G&open=AZ7PXftX8JVNcsmiS90G&pullRequest=17951

Check warning on line 3510 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 121 to 64, Complexity from 18 to 14, Nesting Level from 3 to 2, Number of Variables from 35 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7Zg45Ueb9OVCgZTQ2I&open=AZ7Zg45Ueb9OVCgZTQ2I&pullRequest=17951

Check warning on line 230 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/read_tsfile/ReadTsFileTableFunction.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this usage of 'Stream.collect(Collectors.toList())' with 'Stream.toList()' and ensure that the list is unmodified.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfy98JVNcsmiS90v&open=AZ7PXfy98JVNcsmiS90v&pullRequest=17951

Check warning on line 667 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof ExternalTsFileScanNode externaltsfilescannode'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXf0K8JVNcsmiS90x&open=AZ7PXf0K8JVNcsmiS90x&pullRequest=17951

Check failure on line 106 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ExternalTsFileScanNode.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this "clone" implementation; use a copy constructor or copy factory instead.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXftP8JVNcsmiS90A&open=AZ7PXftP8JVNcsmiS90A&pullRequest=17951

Check failure on line 229 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/ParallelizeGrouping.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7UoaVTL_w-MbTZgu1m&open=AZ7UoaVTL_w-MbTZgu1m&pullRequest=17951

Check warning on line 2059 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof ExternalTsFileScanNode externaltsfilescannode'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7UoaXyL_w-MbTZgu1s&open=AZ7UoaXyL_w-MbTZgu1s&pullRequest=17951

Check failure on line 243 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/predicate/schema/ConvertSchemaPredicateToFilterVisitor.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Fix this call that leads to an IllegalArgumentException.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfyN8JVNcsmiS90X&open=AZ7PXfyN8JVNcsmiS90X&pullRequest=17951

Check warning on line 785 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use "java.util.List.of()" instead.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfw18JVNcsmiS90S&open=AZ7PXfw18JVNcsmiS90S&pullRequest=17951

Check warning on line 1398 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/DataNodeTableOperatorGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 178 to 64, Complexity from 21 to 14, Nesting Level from 4 to 2, Number of Variables from 40 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7Zg48Keb9OVCgZTQ2N&open=AZ7Zg48Keb9OVCgZTQ2N&pullRequest=17951

Check failure on line 108 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/ExternalTsFileAggregationScanNode.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this "clone" implementation; use a copy constructor or copy factory instead.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXftX8JVNcsmiS90F&open=AZ7PXftX8JVNcsmiS90F&pullRequest=17951

Check warning on line 151 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/buffer/ChunkCache.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Method has 8 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfmV8JVNcsmiS9z5&open=AZ7PXfmV8JVNcsmiS9z5&pullRequest=17951

Check failure on line 678 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 17 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfvY8JVNcsmiS90P&open=AZ7PXfvY8JVNcsmiS90P&pullRequest=17951

Check warning on line 274 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushAggregationIntoTableScan.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this unused "analysis" private field.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7UoaQLL_w-MbTZgu1j&open=AZ7UoaQLL_w-MbTZgu1j&pullRequest=17951

Check failure on line 1972 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 34 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfw18JVNcsmiS90T&open=AZ7PXfw18JVNcsmiS90T&pullRequest=17951

Check failure on line 41 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/read_tsfile/ExternalTsFileQueryDataSource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this "clone" implementation; use a copy constructor or copy factory instead.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfyz8JVNcsmiS90m&open=AZ7PXfyz8JVNcsmiS90m&pullRequest=17951

Check warning on line 326 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/distribute/TableDistributedPlanGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 77 to 64, Complexity from 18 to 14, Nesting Level from 5 to 2, Number of Variables from 18 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7Zg42teb9OVCgZTQ2G&open=AZ7Zg42teb9OVCgZTQ2G&pullRequest=17951

Check warning on line 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/read_tsfile/ReadTsFileTableFunction.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Package name 'org.apache.iotdb.db.queryengine.plan.relational.function.tvf.read_tsfile' must match pattern '^[a-z]+(\.[a-z][a-z0-9]*)*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7Ud-kOpFCIhe324pDS&open=AZ7Ud-kOpFCIhe324pDS&pullRequest=17951

Check warning on line 2763 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A "Brain Method" was detected. Refactor it to reduce at least one of the following metrics: LOC from 131 to 64, Complexity from 24 to 14, Nesting Level from 6 to 2, Number of Variables from 28 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7Zg45Ueb9OVCgZTQ2H&open=AZ7Zg45Ueb9OVCgZTQ2H&pullRequest=17951