[
https://issues.apache.org/jira/browse/HIVE-24122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17199545#comment-17199545
]
Stamatis Zampetakis commented on HIVE-24122:
--------------------------------------------
Great, one problem less to deal with :)
> When CBO is enable, CAST(STR as Bigint)IS NOT NULL result is wrong
> -------------------------------------------------------------------
>
> Key: HIVE-24122
> URL: https://issues.apache.org/jira/browse/HIVE-24122
> Project: Hive
> Issue Type: Bug
> Components: CBO
> Affects Versions: 3.1.0, 3.1.2
> Reporter: GuangMing Lu
> Assignee: GuangMing Lu
> Priority: Major
> Fix For: 4.0.0
>
>
> {code:java}
> create database testdb;
> CREATE TABLE IF NOT EXISTS testdb.z_tab
> (
> SEARCHWORD STRING,
> COUNT_NUM BIGINT,
> WORDS STRING
> )
> ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
> STORED AS TEXTFILE;
> insert into table testdb.z_tab
> values('hivetest',111,'aaa'),('hivetest2',111,'bbb');
> set hive.cbo.enable=true;
> SELECT CAST(searchword as bigint) IS NOT NULL FROM testdb.z_tab;
> SELECT CAST(searchword as bigint) IS NULL FROM testdb.z_tab;
> {code}
> The SQL results for both queries are the same, as follows:
> {noformat}
> +-------+
> | _c0 |
> +-------+
> | true |
> | true |
> +-------+{noformat}
> SELECT CAST(searchword as bigint) IS NOT NULL FROM testdb.z_tab; execute
> result is wrong
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)