Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
-
ghx-label-3
Description
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
select t.id from complextypestbl t;
to the AST of the following query
select t.id from ( select cast(id * 100 as BIGINT) as id, cast(int_array as ArrayType) as int_array from complextypestbl) t;
This causes a ParseError since we can't use ArrayType explicitly.
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
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.
Attachments
Issue Links
- relates to
-
IMPALA-9330 Support masking queries containing correlated collection references
- Resolved