You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2022/07/07 12:58:00 UTC

[jira] [Resolved] (HIVE-22822) Column masking policies on complex column will cause unrelative query failures

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

Quanlong Huang resolved HIVE-22822.
-----------------------------------
    Resolution: Duplicate

> 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)