Quanlong Huang created HIVE-22822: ------------------------------------- Summary: 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
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.3.4#803005)