hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (Jira)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-22208) Column name with reserved keyword is unescaped when query including join on table with mask column is re-written
Date Thu, 26 Sep 2019 08:19:00 GMT

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

Hive QA commented on HIVE-22208:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12981373/HIVE-22208.01.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 17008 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestCliDriver.testCliDriver[union_pos_alias] (batchId=58)
org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[results_cache_with_masking]
(batchId=181)
{noformat}

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18737/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18737/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18737/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 2 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12981373 - PreCommit-HIVE-Build

> Column name with reserved keyword is unescaped when query including join on table with
mask column is re-written
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-22208
>                 URL: https://issues.apache.org/jira/browse/HIVE-22208
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 3.1.0, 4.0.0
>            Reporter: Riju Trivedi
>            Assignee: Zoltan Matyus
>            Priority: Critical
>         Attachments: HIVE-22208.01.patch
>
>
> Join query  involving table with mask column and  other having reserved keyword as
column name fails with SemanticException during parsing re-written query :
> Original Query :
> {code:java}
> select a.`date`, b.nm
> from sample_keyword a
> join sample_mask b
> on b.id = a.id;
> {code}
> Re-written Query :
>   
> {code:java}
> select a.date, b.nm
> from sample_keyword a
> join (SELECT `id`, CAST(mask_hash(nm) AS string) AS `nm`, BLOCK__OFFSET__INSIDE__FILE,
INPUT__FILE__NAME, ROW__ID FROM `default`.`sample_mask` )`b`
> on b.id = a.id;
> {code}
> Re-written query does not have escape quotes for date column which cause SemanticException
while parsing :
> {code:java}
> org.apache.hadoop.hive.ql.parse.ParseException: line 1:9 cannot recognize input near
'a' '.' 'date' in selection target                                            
> at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.rewriteASTWithMaskAndFilter( SemanticAnalyzer.java:12084)
                                                           at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(
SemanticAnalyzer.java:12298)        
> at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal( CalcitePlanner.java:360)
       
> at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze( BaseSemanticAnalyzer.java:289)
       
> at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)        
> at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1869)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message