[
https://issues.apache.org/jira/browse/CALCITE-2619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde resolved CALCITE-2619.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.18.0
Fixed in
[36bd5fb2|http://git-wip-us.apache.org/repos/asf/calcite/commit/36bd5fb2];
thanks for the PR, [~tedxu]!
I made some changes to your PR. I changed the two public NlsString constructors
to use the same private constructor, made all fields final (so NlsString is now
immutable), and obsoleted your ByteString class, using instead a pair of
Avatica's ByteString and a Charset in the cache. (Your ByteString had a
charset, while Avatica's ByteString only has an array of bytes.) Lastly, I made
your cache static; a non-static cache would have been useless.
> Reduce string literal creation cost by removing unnecessary charset check
> -------------------------------------------------------------------------
>
> Key: CALCITE-2619
> URL: https://issues.apache.org/jira/browse/CALCITE-2619
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Ted Xu
> Assignee: Julian Hyde
> Priority: Major
> Fix For: 1.18.0
>
>
> The cost of creating NlsString is very high, due to its charset check. In
> some cases, e.g., expression evaluate because of Partition Prune, the
> NlsString creation costs 40%+ of total executor's overhead.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)