[
https://issues.apache.org/jira/browse/CALCITE-4551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17308971#comment-17308971
]
James Starr edited comment on CALCITE-4551 at 3/25/21, 9:06 PM:
----------------------------------------------------------------
[~julianhyde] Yes, I mean FlatList.
The changes are 28f313c +
[06d557c8b|https://github.com/apache/calcite/pull/2378/commits/06d557c8b7bb8d235f279410736883b58bfc5777],
which fix using object references instead of strings.
Excluding the relnode and query as arguments:
For case where metadata call has no arguments, then a single key is generated.
For the case where is takes a single boolean argument, then 2 keys are
generated, one for true and the other for false.
For the case of single enum argument, 1 key is generated for the null case, and
then an array indexed by the ordinal is generated for each value.
For the case of single integer argument, a range of keys is generated, if the
argument is with in the range, then an index look up is done, otherwise the
default FlatList behavior is maintained.
All other cases, the default flat list behavior is maintained.
was (Author: jamesstarr):
[~julianhyde] Yes, I mean FlatList.
The changes are 28f313c +
[06d557c8b|https://github.com/apache/calcite/pull/2378/commits/06d557c8b7bb8d235f279410736883b58bfc5777],
which fix using object references instead of strings.
For case where metadata call has no arguments, then a single key is generated.
For the case where is takes a single boolean argument, then 2 keys are
generated, one for true and the other for false.
For the case of single enum argument, 1 key is generated for the null case, and
then an array indexed by the ordinal is generated for each value.
For the case of single integer argument, a range of keys is generated, if the
argument is with in the range, then an index look up is done, otherwise the
default FlatList behavior is maintained.
All other cases, the default flat list behavior is maintained.
> Fly Weight for MD Cache Keys
> ----------------------------
>
> Key: CALCITE-4551
> URL: https://issues.apache.org/jira/browse/CALCITE-4551
> Project: Calcite
> Issue Type: Improvement
> Reporter: James Starr
> Priority: Major
> Labels: pull-request-available
>
> Create cache keys for metadata calls generates a fair bit of object turn in
> trivial cases, more expensive than the actual metadata call. Many metadata
> calls could reuse their cache keys since the are functionally identical.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)