Skip to content

Support readTsFile table function for external TsFiles#17951

Open
shuwenwei wants to merge 34 commits into
masterfrom
read_tsfile_table_function
Open

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

fix it

9c5cc36
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Jun 16, 2026 in 3m 19s

Quality Gate failed

Failed conditions
E 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 169 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/readTsFile/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 failure on line 571 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/readTsFile/ExternalTsFileQueryResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use try-with-resources or close this "MemoryDeviceTaskRunCursor" in a "finally" clause.

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

Check warning on line 41 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/readTsFile/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 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 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 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 837 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

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

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove the "deviceTaskPartitionCount" field and declare it as a local variable in the relevant methods.

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

Check warning on line 114 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PruneTableScanColumns.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace this instanceof check and cast with 'instanceof DeviceTableScanNode deviceTableScanNode'

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace generic exceptions with specific library exceptions or a custom exception.

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

Check failure on line 41 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/readTsFile/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 20 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/readTsFile/ExternalTsFileQueryDataSource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Rename this package name to match the regular expression '^[a-z_]+(\.[a-z_][a-z0-9_]*)*$'.

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

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Replace generic exceptions with specific library exceptions or a custom exception.

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

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

Replace generic exceptions with specific library exceptions or a custom exception.

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Abbreviation in name 'updateFilterUsingTTL' must contain no more than '2' consecutive capital letters.

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

Check failure on line 833 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 19 to the 15 allowed.

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

Check failure on line 649 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 not always return the same value.

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

Check warning on line 43 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/ExternalTsFileAggTableScanOperator.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=AZ7PXf278JVNcsmiS904&open=AZ7PXf278JVNcsmiS904&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 failure on line 436 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/function/tvf/readTsFile/ExternalTsFileQueryResource.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use try-with-resources or close this "MemoryDeviceTaskRunCursor" in a "finally" clause.

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