diff --git a/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/tree/PruneComplexTypeUtil.java b/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/tree/PruneComplexTypeUtil.java index 4ab1a83a76daf..7065f555f8dd3 100644 --- a/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/tree/PruneComplexTypeUtil.java +++ b/fe/fe-core/src/main/java/com/starrocks/sql/optimizer/rule/tree/PruneComplexTypeUtil.java @@ -103,13 +103,6 @@ public void addAccessPaths(ColumnRefOperator columnRefOperator, } public void add(ColumnRefOperator outputColumnRefOperator, ScalarOperator scalarOperator) { - // If outputColumnRefOperator's type is not equal to scalarOperator's type, - // we just stop pruning in case. - if (!checkCanPrune(outputColumnRefOperator, scalarOperator)) { - setEnablePruneComplexTypes(false); - return; - } - ComplexTypeAccessGroup visitedAccessGroup = null; if (outputColumnRefOperator != null) { // If outputColumnRefOperator is not null, it means it may have visited access group, @@ -158,22 +151,6 @@ private ColumnRefOperator getOriginalColRef(ColumnRefOperator col) { return col; } - private boolean checkCanPrune(ColumnRefOperator columnRefOperator, ScalarOperator scalarOperator) { - if (columnRefOperator == null) { - return true; - } - - if (!columnRefOperator.getType().isComplexType() && !scalarOperator.getType().isComplexType()) { - // If columnRefOperator and scalarOperator both are not complex type, don't need to check - return true; - } - - if (!columnRefOperator.getType().equals(scalarOperator.getType())) { - LOG.warn(String.format("Complex type columnRefOperator[%s] and scalarOperator[%s] should has the same " + - "type", columnRefOperator.getType(), scalarOperator.getType())); - } - return true; - } } private static ComplexTypeAccessPaths concatAccessPaths(