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

Haisheng Yuan edited comment on CALCITE-2619 at 10/12/18 7:16 AM:
------------------------------------------------------------------

[~julianhyde] Once the CharsetEncoder of the CharSet passes the encoding test, 
do we need to do the charset test every time when NlsString is created with the 
same charset? If not, we can definitely cache the Charset after it passes 
charset test, and skip the charset test if it can be found in the cache. But 
[~tedxu] said it is still expensive, how much overhead for doing this?


was (Author: hyuan):
[~julianhyde] Once the CharsetEncoder of the CharSet passes the encoding test, 
do we need to do the charset test every time when NlsString is created with the 
same charset? If not, we can definitely cache the Charset after it passes 
charset test, and skip the charset test if it can be found in the cache.

> Reduce string literal creation cost by removing 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: Ted Xu
>            Priority: Major
>
> 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)

Reply via email to