hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ankesh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-22029) Create table as select throws an error for Masked enabled table
Date Thu, 25 Jul 2019 06:47:00 GMT

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

Ankesh commented on HIVE-22029:
-------------------------------

[~vgarg] I have added the steps to reproduce, please go through it.

I am using hive version 2.3, let me know what else you need.

> Create table as select throws an error for Masked enabled table
> ---------------------------------------------------------------
>
>                 Key: HIVE-22029
>                 URL: https://issues.apache.org/jira/browse/HIVE-22029
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ankesh
>            Priority: Major
>         Attachments: 2019-07-25 at 11.28.51 AM.png
>
>
> After enabling Column level masking on a Table, create table as select command fails
during preCbo planner context.
>  
> Here is the stack trace for the failure : 
> Caused by: java.lang.RuntimeException: java.lang.AssertionError:Unexpected type UNEXPECTED
>  ! at org.apache.hadoop.hive.ql.parse.CalcitePlanner.fixUpAfterCbo(CalcitePlanner.java:949)
>  ! at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:367)
>  ! at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:11153)
>  ! at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:286)
>  ! at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:258)
>  ! at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:515)
>  ! at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1320)
>  ! at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1298)
>  ! at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:204)
>  ! 
>  
>  
> As far as my understanding, it is setting UNEXPECTED type when there is a masked table
and it do not understand what is the datatype for the column.
>  We are setting again the context type, but my suspect is we are not resetting the context.
>  
> Here are the steps to reproduce : 
> 1. Enable masking for any of the column, please check screenshot for the same.
> !2019-07-25 at 11.28.51 AM.png!
> 2. Enable config "hive.cbo.enable" to true.
> 3. Now connect using jdbc connection through beeline and execute the following hive query
: create table as select * from "table_name where masking is enabled" limit 1;
> In my case as per screenshot, create table as select * from cp_user__address_hive_dim
limit 1;



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message