Skip to content

Support readTsFile table function for external TsFiles#17951

Open
shuwenwei wants to merge 46 commits into
masterfrom
read_tsfile_table_function
Open

Support readTsFile table function for external TsFiles#17951
shuwenwei wants to merge 46 commits into
masterfrom
read_tsfile_table_function

fix comment

500458a
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jun 18, 2026 in 3m 20s

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 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

Use super.clone() to create and seed the cloned instance to be returned.

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

Check warning on line 256 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractAggTableScanOperator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this if-then-else statement by a single method invocation.

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

Check warning on line 298 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/AggregationTableScanNode.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=AZ7PXftq8JVNcsmiS90I&open=AZ7PXftq8JVNcsmiS90I&pullRequest=17951

Check warning on line 169 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=AZ7PXfy98JVNcsmiS90t&open=AZ7PXfy98JVNcsmiS90t&pullRequest=17951

Check warning on line 127 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 instanceof check and cast with 'instanceof String string'

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfy98JVNcsmiS90r&open=AZ7PXfy98JVNcsmiS90r&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 39 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/ExternalTsFileTableScanOperator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

This class has 7 parents which is greater than 5 authorized.

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

Check warning on line 238 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

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7UoaVTL_w-MbTZgu1o&open=AZ7UoaVTL_w-MbTZgu1o&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 127 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/read_tsfile/TsFileSchemaCollector.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

All overloaded methods should be placed next to each other. Placing non-overloaded methods in between overloaded methods with the same type is a violation. Previous overloaded method located at line '64'.

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

Check warning 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

Use super.clone() to create and seed the cloned instance to be returned.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfyz8JVNcsmiS90l&open=AZ7PXfyz8JVNcsmiS90l&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 155 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=AZ7PXfy98JVNcsmiS90s&open=AZ7PXfy98JVNcsmiS90s&pullRequest=17951

Check warning on line 58 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/DataNodeTableBuiltinTableFunction.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this "switch" statement by "if" statements to increase readability.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfyW8JVNcsmiS90Y&open=AZ7PXfyW8JVNcsmiS90Y&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 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 warning on line 284 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/read_tsfile/ExternalTsFileQueryResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Cast one of the operands of this multiplication operation to a "long".

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXfyi8JVNcsmiS90b&open=AZ7PXfyi8JVNcsmiS90b&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 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 44 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

Override the "equals" method in this class.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ7PXftP8JVNcsmiS9z9&open=AZ7PXftP8JVNcsmiS9z9&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 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 1478 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 162 to 64, Complexity from 21 to 14, Nesting Level from 3 to 2, Number of Variables from 26 to 6.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Move this method into "DeviceTaskPartition".

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

Check failure on line 854 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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