[
https://issues.apache.org/jira/browse/HIVE-24094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17192041#comment-17192041
]
zhaolong edited comment on HIVE-24094 at 9/8/20, 8:43 AM:
----------------------------------------------------------
upgrade calcite-core to 1.19.0, can resolve this problem。
!image-2020-09-08-16-42-54-728.png!
!image-2020-09-08-16-43-00-848.png!
i think this is the calcite bug link.
https://issues.apache.org/jira/browse/CALCITE-3609
was (Author: fsilent):
upgrade calcite-core to 1.19.0, can resolve this problem。
!image-2020-09-08-16-42-00-966.png!
i think this is the calcite bug link.
https://issues.apache.org/jira/browse/CALCITE-3609
> cast type mismatch and use is not null, the results are error if cbo is true
> ----------------------------------------------------------------------------
>
> 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, image-2020-09-04-10-54-43-141.png,
> image-2020-09-04-10-56-00-764.png, image-2020-09-04-10-56-07-286.png,
> image-2020-09-04-10-59-36-780.png, image-2020-09-04-11-02-07-917.png,
> image-2020-09-04-11-02-18-008.png, image-2020-09-07-15-20-44-201.png,
> image-2020-09-07-15-21-35-566.png, image-2020-09-07-15-24-59-015.png,
> image-2020-09-07-15-25-18-785.png, image-2020-09-08-16-42-54-728.png,
> image-2020-09-08-16-43-00-848.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)