You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Csaba Ringhofer (Jira)" <ji...@apache.org> on 2026/10/20 12:19:00 UTC
[jira] [Resolved] (IMPALA-13806) Avoid per-function std::locale creation
[ https://issues.apache.org/jira/browse/IMPALA-13806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Csaba Ringhofer resolved IMPALA-13806.
--------------------------------------
Fix Version/s: Impala 5.0.0
Resolution: Fixed
> 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
> Fix For: Impala 5.0.0
>
>
> 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)