[jira] [Commented] (HIVE-24122) When CBO is enable, CAST(STR as Bigint)IS NOT NULL result is wrong

2020-09-21 Thread Stamatis Zampetakis (Jira)


[ 
https://issues.apache.org/jira/browse/HIVE-24122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (HIVE-24122) When CBO is enable, CAST(STR as Bigint)IS NOT NULL result is wrong

2020-09-21 Thread GuangMing Lu (Jira)


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

GuangMing Lu commented on HIVE-24122:
-

Hey {color:#0066cc} [~zabetak]  {color:#172b4d} Thanks for reminding me that I 
was test in the master is ok, the reason why the master used calcite-1.21. 
{color}{color}

{color:#0066cc}{color:#172b4d}After analysis, the problem was fixed in calcite 
1.19 or above{color}{color}

> 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
>Priority: Major
>
> {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)


[jira] [Commented] (HIVE-24122) When CBO is enable, CAST(STR as Bigint)IS NOT NULL result is wrong

2020-09-07 Thread Stamatis Zampetakis (Jira)


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

Stamatis Zampetakis commented on HIVE-24122:


Hey [~luguangming] did you reproduce it on current master?

> 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
>Priority: Major
>
> {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)