Skip to content

fix ut

faeaa76
Select commit
Loading
Failed to load commit list.
Open

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

fix ut
faeaa76
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis failed Apr 22, 2026 in 5m 55s

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 1589 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 162 to 64, Complexity from 25 to 14, Nesting Level from 6 to 2, Number of Variables from 32 to 6.

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

Check warning on line 147 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-I61b20n&open=AZ2vkG8SGZOU-I61b20n&pullRequest=17526

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

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

Check failure on line 615 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 "REPLACE" 3 times.

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

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

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

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 186).

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

Check warning on line 668 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-I61b20m&open=AZ2vkG8SGZOU-I61b20m&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

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

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

Check warning on line 33 in iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/transformation/dag/util/InputRowUtils.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Line is longer than 100 characters (found 102).

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

Check warning on line 657 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-I61b20v&open=AZ2vkG8SGZOU-I61b20v&pullRequest=17526

Check failure on line 114 in iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/join/LeftOuterTimeJoinOperator.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use static access with "org.apache.iotdb.calc.execution.operator.CommonOperatorContext" for "getMaxRunTime".

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

Add a private constructor to hide the implicit public one.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 877 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 " TO ROLE " 3 times.

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

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

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

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

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

"visitLikePredicate" 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-I61b21k&open=AZ2vkHosGZOU-I61b21k&pullRequest=17526

Check warning on line 22 in iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/queryengine/plan/planner/plan/node/IPlanNodeDeserializer.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

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

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

Check failure on line 530 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 "\" = \"" 8 times.

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

Check failure on line 1589 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 192 in iotdb-core/calc-commons/src/main/java/org/apache/iotdb/calc/execution/operator/source/relational/aggregation/TableModeAccumulator.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 89 to 64, Complexity from 23 to 14, Nesting Level from 3 to 2, Number of Variables from 7 to 6.

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

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

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Update this method so that its implementation is not identical to "getTypeProvider" on line 308.

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

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

"visitSearchedCaseExpression" 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-I61b21p&open=AZ2vkHosGZOU-I61b21p&pullRequest=17526

Check warning on line 468 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 failure on line 350 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

End this switch case with an unconditional break, return or throw statement.

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