hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szehon Ho (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-11973) IN operator fails when the column type is DATE
Date Thu, 01 Oct 2015 22:24:27 GMT

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

Szehon Ho commented on HIVE-11973:
----------------------------------

Posting on behalf of HiveQA which was locked out:

{color:red}Overall{color}: -1 at least one tests failed

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

{color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 9642 tests executed
*Failed tests:*
{noformat}
org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation
{noformat}

Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5483/testReport
Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5483/console
Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-5483/

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

> IN operator fails when the column type is DATE 
> -----------------------------------------------
>
>                 Key: HIVE-11973
>                 URL: https://issues.apache.org/jira/browse/HIVE-11973
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 1.0.0
>            Reporter: sanjiv singh
>            Assignee: Yongzhi Chen
>         Attachments: HIVE-11973.1.patch
>
>
> Test DLL :
> {code}
> CREATE TABLE `date_dim`(
>   `d_date_sk` int, 
>   `d_date_id` string, 
>   `d_date` date, 
>   `d_current_week` string, 
>   `d_current_month` string, 
>   `d_current_quarter` string, 
>   `d_current_year` string) ;
> {code}
> Hive query :
> {code}
>     SELECT *  
>     FROM   date_dim     
>     WHERE d_date  IN ('2000-03-22','2001-03-22')  ;
> {code}
> In 1.0.0 ,  the above query fails with:
> {code}
>     FAILED: SemanticException [Error 10014]: Line 1:180 Wrong arguments ''2001-03-22'':
The arguments for IN should be the same type! Types are: {date IN (string, string)}
> {code}
> I changed the query as given to pass the error :
> {code}
>     SELECT *  
>     FROM   date_dim     
>     WHERE d_date  IN (CAST('2000-03-22' AS DATE) , CAST('2001-03-22' AS DATE)  )  ;
> {code}
> But it works without casting  :
> {code}
>     SELECT *  
>     FROM   date_dim     
>     WHERE d_date   = '2000-03-22' ;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message