Code review comment: Code Review Suggestions:  1. Bug Risk: In the `Context` class constructor, it would be better to initialize the `enablePruneComplexTypesInUnnest` variable explicitly instead of relying on the default value. It could be rewritten as follows:    ```java    public Context(boolean enablePruneComplexTypesInUnnest) {        this.accessGroups = new HashMap<>();        this.enablePruneComplexTypes = true;        this.unnestColRefMap = new HashMap<>();        this.enablePruneComplexTypesInUnnest = enablePruneComplexTypesInUnnest;    }    ```  2. Naming: The variable names in the `Context` class could be improved for better clarity. Consider renaming `accessGroups` to something like `complexTypeAccessGroups`, and `unnestColRefMap` to `unnestColumnRefMap`.  3. Code Style: In the `addAccessPaths` method of the `Context` class, the statement `accessGroups.putIfAbsent(columnRefOperator, new ComplexTypeAccessGroup())` can be simplified using the `computeIfAbsent` method:    ```java    accessGroups.computeIfAbsent(columnRefOperator, key -> new ComplexTypeAccessGroup());    ```  4. Best Practices: In the `addAccessPaths` method of the `Context` class, when adding access paths for the original column reference (`oriColRefOperator`), you can reuse the existing code block by extracting it into a separate method. This avoids code duplication.  5. Simplicity: It's recommended to avoid deep nesting in conditional statements to improve readability. Consider simplifying or refactoring complex conditions, such as the one in the `checkCanPrune` method of the `Context` class.  6. Optimization Points: In the `setUnnest` method of the `Context` class, the loop that maps output to input column references can be simplified using the `IntStream.range` method:    ```java    IntStream.range(0, operator.getFnResultColRefs().size())        .forEach(i -> {            ColumnRefOperator output = operator.getFnResultColRefs().get(i);            ColumnRefOperator input = operator.getFnParamColumnRefs().get(i);            unnestColRefMap.put(output, input);            if (getVisitedAccessGroup(output) != null) {                accessGroups.put(input, getVisitedAccessGroup(output));                if (operator.getProjection() == null && operator.getOutputColRefs().contains(output)) {                    add(input, input);                }            }        });    ```  7. Compatibility: The code patch did not include any changes related to compatibility or compatibility risks based on the provided context.  Note: It's important to consider the specific requirements, architecture, and standards of your project during a code review. These suggestions are based solely on the provided code snippet and general best practices.

Code under review:
private boolean checkCanPrune(ColumnRefOperator columnRefOperator, ScalarOperator scalarOperator) {
            if (columnRefOperator == null) {
                return true;
            }

            if (!columnRefOperator.getType().isComplexType() && !scalarOperator.getType().isComplexType()) {
                
                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;
        }

Line commented on: return true;

Revised code:
private boolean checkCanPrune(ColumnRefOperator columnRefOperator, ScalarOperator scalarOperator) {
            if (columnRefOperator == null) {
                return true;
            }

            if (!columnRefOperator.getType().isComplexType() && !scalarOperator.getType().isComplexType()) {
                
                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;
        }