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

Quanlong Huang resolved IMPALA-9329.
------------------------------------
    Fix Version/s: Impala 3.4.0
       Resolution: Fixed

Fixed by IMPALA-9330

> Table masking view should not have nested columns in select list
> ----------------------------------------------------------------
>
>                 Key: IMPALA-9329
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9329
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Security
>            Reporter: Quanlong Huang
>            Assignee: Quanlong Huang
>            Priority: Critical
>             Fix For: Impala 3.4.0
>
>
> If a table contains nested columns and column masking policies on some 
> primitive columns, we should not add the nested columns in the table masking 
> view.
> To be specific, let's say table complextypestbl (id bigint, int_arr 
> array<int>) has column masking policy on id: "id => id * 100". We will 
> translate the AST of the following query
> {code:sql}
> select t.id from complextypestbl t;
> {code}
> to the AST of the following query
> {code:sql}
> select t.id from (
>   select cast(id * 100 as BIGINT) as id,
>     cast(int_array as ArrayType) as int_array
>   from complextypestbl) t;
> {code}
> This causes a ParseError since we can't use ArrayType explicitly.
> {code:sql}
> ERROR: ParseException: Syntax error in line 1:
> SELECT CAST(int_array AS org.apache.impala.catalog.Ar...
>                          ^
> Encountered: IDENTIFIER
> Expected: ARRAY, BIGINT, BINARY, BOOLEAN, CHAR, DATE, DATETIME, DECIMAL, 
> REAL, FLOAT, INTEGER, MAP, SMALLINT, STRING, STRUCT, TIMESTAMP, TINYINT, 
> VARCHAR
> CAUSED BY: Exception: Syntax error
> {code}
> On the other hand, we don't support nested types in select list. So we should 
> remove the redundant column for 'int_array' in the table masking view.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to