hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "zhaolong (Jira)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-24094) cast is not null, the results are different in cbo is true and false
Date Tue, 01 Sep 2020 03:36:00 GMT

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

zhaolong updated HIVE-24094:
----------------------------
    Component/s: CBO

> cast is not null, the results are different in cbo is true and false 
> ---------------------------------------------------------------------
>
>                 Key: HIVE-24094
>                 URL: https://issues.apache.org/jira/browse/HIVE-24094
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO
>    Affects Versions: 3.1.0
>            Reporter: zhaolong
>            Priority: Major
>         Attachments: image-2020-08-31-10-01-26-250.png, image-2020-08-31-10-02-39-154.png
>
>
> 1.CREATE TABLE IF NOT EXISTS testa
> ( 
>  SEARCHWORD STRING, 
>  COUNT_NUM BIGINT, 
>  WORDS STRING 
> ) 
> ROW FORMAT DELIMITED FIELDS TERMINATED BY '\27' 
> STORED AS TEXTFILE; 
> 2.insert into testa values('searchword', 1, 'a');
> 3.set hive.cbo.enable=false;
> 4.SELECT 
> CASE 
>  WHEN CAST(searchword as bigint) IS NOT NULL THEN CAST(CAST(searchword as bigint) as
String) 
>  ELSE searchword 
> END AS WORDS, 
> searchword FROM testa;
> !image-2020-08-31-10-01-26-250.png!
> 5.set hive.cbo.enable=true;
> 6.SELECT 
> CASE 
>  WHEN CAST(searchword as bigint) IS NOT NULL THEN CAST(CAST(searchword as bigint) as
String) 
>  ELSE searchword 
> END AS WORDS, 
> searchword FROM testa;
> !image-2020-08-31-10-02-39-154.png!



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

Mime
View raw message