Frank Chen created CALCITE-7807:
-----------------------------------

             Summary: Reuse unchanged SQL types during least-restrictive 
inference
                 Key: CALCITE-7807
                 URL: https://issues.apache.org/jira/browse/CALCITE-7807
             Project: Calcite
          Issue Type: Sub-task
            Reporter: Frank Chen


Large string ARRAY validation repeatedly combines compatible character types. 
The least-restrictive path may call createTypeWithCharsetAndCollation even when 
the current immutable BasicSqlType already has the requested charset and 
collation.

Return the existing BasicSqlType immediately when the requested charset and 
collation are unchanged. Requests that change either attribute retain the 
existing construction and canonicalization path.

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

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



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

Reply via email to