You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/03/08 19:14:38 UTC

[jira] [Commented] (CALCITE-1680) Optimization for RelDataTypeImpl.getField

    [ https://issues.apache.org/jira/browse/CALCITE-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15901809#comment-15901809 ] 

Julian Hyde commented on CALCITE-1680:
--------------------------------------

I am a bit wary of adding a map to RelDataTypeImpl because many instances of it are created during planning (each RelNode has a row-type) and I want to conserve memory and initialization cost. Do you have a test case that demonstrates a performance issue? When we have that, we can investigate this and other solutions to the performance problem.

> Optimization for RelDataTypeImpl.getField
> -----------------------------------------
>
>                 Key: CALCITE-1680
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1680
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Kevin Liew
>            Assignee: Julian Hyde
>            Priority: Minor
>
> {{RelDataTypeImpl.getField}} is implemented as a loop and is often called in a loop. We can store a {{HashMap}} from column-name to {{fieldList}} index when instantiating {{RelDataTypeImpl}} to improve performance. One of the call hierarchies involves {{SqlToRelConverter.convertIdentifier}} which is called often.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)