[ https://issues.apache.org/jira/browse/HIVE-24099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
zhaolong updated HIVE-24099: ---------------------------- Description: unix_timestamp,intersect,except throws NPE when cbo is false and optimize.constant.propagation is false reproduced problems: 1. unix_timestap: set hive.cbo.enable=true; set hive.optimize.constant.propagation=false; {color:#000000} create table test_pt(idx string, namex string) partitioned by(pt_dt string) stored as orc;{color} {color:#000000} explain extended select count(1) from test_pt where pt_dt = unix_timestamp();{color} {color:#000000}!image-2020-09-01-10-22-07-549.png!{color} {color:#000000}2.intersect{color} {color:#000000} create table t1(id int, name string, score int);{color} create table t2(id int, name string, score int); insert into t1 values(1,'xiaoming', 98); insert into t2 values(2,'xiaohong', 95); select id from t1 intersect select id from t2; !image-2020-09-01-10-26-14-062.png! 3.except select id from t1 except select id from t2; !image-2020-09-01-10-27-23-916.png! was: unix_timestamp,intersect,except throws NPE when cbo is false and optimize.constant.propagation is false reproduced problems: 1. unix_timestap: set hive.cbo.enable=true; set hive.optimize.constant.propagation=false; {color:#000000} create table test_pt(idx string, namex string) partitioned by(pt_dt string) stored as orc;{color} {color:#000000} explain extended select count(1) from test_pt where pt_dt = unix_timestamp();{color} {color:#000000}!image-2020-09-01-10-22-07-549.png!{color} {color:#000000}2.intersect{color} {color:#000000} create table t1(id int, name string, score int);{color} create table t2(id int, name string, score int); insert into t1 values(1,'xiaoming', 98); insert into t2 values(2,'xiaohong', 95); > unix_timestamp,intersect,except throws NPE > ------------------------------------------ > > Key: HIVE-24099 > URL: https://issues.apache.org/jira/browse/HIVE-24099 > Project: Hive > Issue Type: Bug > Affects Versions: 3.1.0 > Reporter: zhaolong > Priority: Major > Attachments: image-2020-09-01-10-22-07-549.png, > image-2020-09-01-10-26-14-062.png, image-2020-09-01-10-27-23-916.png > > > unix_timestamp,intersect,except throws NPE when cbo is false and > optimize.constant.propagation is false > reproduced problems: > 1. unix_timestap: > set hive.cbo.enable=true; > set hive.optimize.constant.propagation=false; > {color:#000000} create table test_pt(idx string, namex string) > partitioned by(pt_dt string) stored as orc;{color} > {color:#000000} explain extended select count(1) from test_pt where pt_dt > = unix_timestamp();{color} > {color:#000000}!image-2020-09-01-10-22-07-549.png!{color} > {color:#000000}2.intersect{color} > {color:#000000} create table t1(id int, name string, score int);{color} > create table t2(id int, name string, score int); > insert into t1 values(1,'xiaoming', 98); > insert into t2 values(2,'xiaohong', 95); > select id from t1 intersect select id from t2; > !image-2020-09-01-10-26-14-062.png! > 3.except > select id from t1 except select id from t2; > !image-2020-09-01-10-27-23-916.png! -- This message was sent by Atlassian Jira (v8.3.4#803005)