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 2020/04/16 03:42:00 UTC

[jira] [Updated] (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 updated IMPALA-9662:
-----------------------------------
    Description: 
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 two. 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.

  was:
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.

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.


> 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
>            Reporter: Quanlong Huang
>            Priority: Major
>
> 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 two. 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