[ 
https://issues.apache.org/jira/browse/IMPALA-13806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on IMPALA-13806 started by Mihaly Szjatinya.
-------------------------------------------------
> Avoid per-function std::locale creation
> ---------------------------------------
>
>                 Key: IMPALA-13806
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13806
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>            Reporter: Csaba Ringhofer
>            Assignee: Mihaly Szjatinya
>            Priority: Major
>              Labels: ramp-up
>
> https://github.com/apache/impala/blob/4c549d79f2648c5ed906deef42c8d05bb747d8b0/be/src/exprs/mask-functions-ir.cc#L151
> The line above creates a local on every invocation of the mask function.
> This has 2 issues:
> 1. probably makes the function slower
> 2. it may turn out during execution that the locale cannot be created, 
> leading to an exception (and crash at the moment)
> std::locale/facet is thread safe (and immutable) based on 
> https://en.cppreference.com/w/cpp/locale/locale
> A locale could be created per fragment instance or a global "en_US.UTF-8" 
> could be used at all places.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to