Jerome Isaac Haltom created CALCITE-7548:
--------------------------------------------

             Summary: ConditionalExpression.expressionList should have public 
visibility
                 Key: CALCITE-7548
                 URL: https://issues.apache.org/jira/browse/CALCITE-7548
             Project: Calcite
          Issue Type: Improvement
          Components: linq4j
    Affects Versions: 1.41.0
            Reporter: Jerome Isaac Haltom


{{ConditionalExpression holds its condition/branch nodes in a field named 
expressionList, but the field has non-public (package-private) visibility. The 
parallel type ConditionalStatement exposes its equivalent field as public, so 
this is likely an unintentional inconsistency.}}

{{Because the field is not accessible, external visitors that implement 
Visitor/VisitorImpl and need to walk the branches of a ConditionalExpression 
are forced to reach it via reflection:}}

{{Field f = ConditionalExpression.class.getDeclaredField("expressionList");}}
{{f.setAccessible(true);}}
{{List<?> exprs = (List<?>) f.get(node);}}

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to