You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2021/09/16 00:02:00 UTC
[jira] [Resolved] (IMPALA-9662) Add builtin functions for masking
UTF-8 strings
[ https://issues.apache.org/jira/browse/IMPALA-9662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Quanlong Huang resolved IMPALA-9662.
------------------------------------
Fix Version/s: Impala 4.1.0
Resolution: Fixed
> Add builtin functions for masking UTF-8 strings
> -----------------------------------------------
>
> Key: IMPALA-9662
> URL: https://issues.apache.org/jira/browse/IMPALA-9662
> Project: IMPALA
> Issue Type: New Feature
> Components: Backend
> Reporter: Quanlong Huang
> Assignee: Quanlong Huang
> Priority: Major
> Fix For: Impala 4.1.0
>
>
> The existing mask functions can only deal with ASCII characters. It will be very useful to provide mask functions that can deal with UTF-8 characters, or to improve current mask fuctions to deal with them as Hive does. Otherwise, Impala may leak information since we count each UTF-8 character as three. For example, if we want to mask the last two characters, Impala only masks the last UTF-8 character.
> {code:sql}
> hive> select mask_last_n('SQL引擎', 2, 'x', 'x', 'x', 'x');
> SQLxx
> impala> select mask_last_n('SQL引擎', 2, 'x', 'x', 'x', 'x');
> SQL引�xx
> {code}
> Some common scenarios:
> * Masking the last two UTF-8 characters of Chinese names.
> * Show only the first several UTF-8 characters of Chinese addresses and mask all the remaining characters.
> However, this depends on our BE support for UTF-8 strings.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org