Skip to content

fix ut

8367c56
Select commit
Loading
Failed to load commit list.
Merged

Refactor: extract shared table-model PlanNode and Operator code from datanode #17526

fix ut
8367c56
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Apr 24, 2026 in 6m 17s

Quality Gate failed

Failed conditions
7.3% Duplication on New Code (required ≤ 5%)
C 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 153 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/DataNodeDateTimeUtils.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 '62'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkISjGZOU-I61b227&open=AZ2vkISjGZOU-I61b227&pullRequest=17526

Check failure on line 229 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/DataNodeSqlFormatter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "IF EXISTS " 15 times.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkHnlGZOU-I61b21T&open=AZ2vkHnlGZOU-I61b21T&pullRequest=17526

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

"visitNullIfExpression" is defined in the "CommonQueryAstVisitor" interface and can be removed from this class.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkHosGZOU-I61b21r&open=AZ2vkHosGZOU-I61b21r&pullRequest=17526

Check failure on line 876 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

Define a constant instead of duplicating this literal " is null" 4 times.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH_yGZOU-I61b22H&open=AZ2vkH_yGZOU-I61b22H&pullRequest=17526

Check warning on line 123 in iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/FirstByAccumulator.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 86 to 64, Complexity from 28 to 14, Nesting Level from 3 to 2, Number of Variables from 14 to 6.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkIgLGZOU-I61b22-&open=AZ2vkIgLGZOU-I61b22-&pullRequest=17526

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

Distance between variable 'columnSchemas' declaration and its first usage is 5, but allowed 3. Consider making that variable final if you still need to store its value in advance (before method calls that might have side effects on the original value).

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH_yGZOU-I61b22b&open=AZ2vkH_yGZOU-I61b22b&pullRequest=17526

Check failure on line 818 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/DataNodeSqlFormatter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal " WITH GRANT OPTION" 10 times.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkHnlGZOU-I61b21P&open=AZ2vkHnlGZOU-I61b21P&pullRequest=17526

Check failure on line 331 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/DataNodeSqlFormatter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "ALTER" 4 times.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkHnlGZOU-I61b21N&open=AZ2vkHnlGZOU-I61b21N&pullRequest=17526

Check warning on line 25 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/an/DataNodeTableFunctionAINodeServiceProvider.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkIOrGZOU-I61b22x&open=AZ2vkIOrGZOU-I61b22x&pullRequest=17526

Check failure on line 661 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

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkHrUGZOU-I61b21v&open=AZ2vkHrUGZOU-I61b21v&pullRequest=17526

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

Member name 'INSTANCE_SIZE' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH_yGZOU-I61b22Y&open=AZ2vkH_yGZOU-I61b22Y&pullRequest=17526

Check warning on line 1282 in iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/plan/planner/TableOperatorGenerator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkJAuGZOU-I61b23O&open=AZ2vkJAuGZOU-I61b23O&pullRequest=17526

Check warning on line 661 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanVisitor.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 '262'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH8zGZOU-I61b219&open=AZ2vkH8zGZOU-I61b219&pullRequest=17526

Check warning on line 166 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/DataNodeDateTimeUtils.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor the code in order to not assign to this loop counter from within the loop body.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkISjGZOU-I61b222&open=AZ2vkISjGZOU-I61b222&pullRequest=17526

Check warning on line 25 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/function/ITableFunctionAINodeService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkG2TGZOU-I61b20h&open=AZ2vkG2TGZOU-I61b20h&pullRequest=17526

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Split this “Monster Class” into smaller and more specialized ones to reduce its dependencies on other classes from 79 to the maximum authorized 20 or less.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH_IGZOU-I61b22B&open=AZ2vkH_IGZOU-I61b22B&pullRequest=17526

Check failure on line 3648 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

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkHrUGZOU-I61b215&open=AZ2vkHrUGZOU-I61b215&pullRequest=17526

Check failure on line 1594 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

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH_yGZOU-I61b22P&open=AZ2vkH_yGZOU-I61b22P&pullRequest=17526

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

Replace this lambda with method reference 'Accountable::ramBytesUsed'.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH_yGZOU-I61b22L&open=AZ2vkH_yGZOU-I61b22L&pullRequest=17526

Check warning on line 31 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/an/DataNodeTableFunctionAINodeService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

A Singleton implementation was detected. Make sure the use of the Singleton pattern is required and the implementation is the right one for the context.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkIOiGZOU-I61b22v&open=AZ2vkIOiGZOU-I61b22v&pullRequest=17526

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

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

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH_yGZOU-I61b22Z&open=AZ2vkH_yGZOU-I61b22Z&pullRequest=17526

Check warning on line 653 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/relational/sql/util/CommonQuerySqlFormatter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Call "Optional#isPresent()" before accessing the value.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkG8SGZOU-I61b20k&open=AZ2vkG8SGZOU-I61b20k&pullRequest=17526

Check warning on line 60 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/ast/ViewFieldDefinition.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Add the "@Override" annotation above this method signature

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkHjVGZOU-I61b21E&open=AZ2vkHjVGZOU-I61b21E&pullRequest=17526

Check failure on line 830 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/sql/util/DataNodeSqlFormatter.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal " ON DATABASE " 4 times.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkHnlGZOU-I61b21W&open=AZ2vkHnlGZOU-I61b21W&pullRequest=17526

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

Declare "descendingCount" on a separate line.

See more on https://sonarcloud.io/project/issues?id=apache_iotdb&issues=AZ2vkH_yGZOU-I61b22R&open=AZ2vkH_yGZOU-I61b22R&pullRequest=17526