Frank Chen created CALCITE-7806:
-----------------------------------

             Summary: Avoid resolving generated CAST calls during ARRAY 
validation
                 Key: CALCITE-7806
                 URL: https://issues.apache.org/jira/browse/CALCITE-7806
             Project: Calcite
          Issue Type: Sub-task
            Reporter: Frank Chen


Large string ARRAY validation creates generated CAST calls for operands whose 
inferred type differs from the common element type. These calls already use the 
built-in CAST operator, but the normal validation path resolves the operator 
again by name for every operand.

Validate each generated CAST directly through its existing operator before 
replacing the operand. This preserves operand checks and validated-node type 
registration while avoiding repeated function lookup.

The isolated Druid benchmark reduced allocation by 19.95% at 100,000 string 
literals and 20.48% at 1,000,000 string literals.

Pull request: [PR #5280|https://github.com/apache/calcite/pull/5280]



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

Reply via email to