[ 
https://issues.apache.org/jira/browse/HIVE-22822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17563782#comment-17563782
 ] 

Quanlong Huang commented on HIVE-22822:
---------------------------------------

Resolving this as it duplicates HIVE-20628.

> Column masking policies on complex column will cause unrelative query failures
> ------------------------------------------------------------------------------
>
>                 Key: HIVE-22822
>                 URL: https://issues.apache.org/jira/browse/HIVE-22822
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Quanlong Huang
>            Priority: Major
>
>  Create a table with complex types columns:
> {code:sql}
> CREATE TABLE customers(
>   id int, 
>   name string, 
>   email_preferences 
> struct<email_format:string,frequency:string,categories:struct<promos:boolean,surveys:boolean>>,
>  
>  addresses 
> map<string,struct<street_1:string,street_2:string,city:string,state:string,zip_code:string>>,
>  
>   orders 
> array<struct<order_id:string,order_date:string,items:array<struct<product_id:int,sku:string,name:string,price:double,qty:int>>>>
> ) stored as ORC;
> {code}
> In Ranger, add a column masking policy on the 'addresses' column to nullify 
> the values. Then run "select id from customers" in Hive. Hit the error:
> {code:java}
> Error while compiling statement: FAILED: SemanticException 
> org.apache.hadoop.hive.ql.parse.ParseException: line 1:101 cannot recognize 
> input near 'map' '<' 'string' in primitive type specification
> {code}
> The query just reads the "id" column and the failure looks like relative to 
> the masked "address" column. It should not fail.
> I use Hive3 in testing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to