Skip to content

HIVE-28920: Unstable tests due to unixtimestamp() and constant folding #5799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
set hive.optimize.join.disjunctive.transitive.predicates.pushdown=false;

-- HiveProject(month=[CAST(202503):INTEGER])
--! qt:replace:/(.*month=\[CAST\()\d+(\).*)/$1#Masked#$2/
set hive.test.currenttimestamp=2025-04-02 10:05:03;

CREATE TABLE test1 (act_nbr string);
CREATE TABLE test2 (month int);
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
-- Materialzed view definition has non-deterministic function

-- HiveFilter(condition=[<=(CAST($1):BIGINT, 1744204765)])
--! qt:replace:/(.*,\s)\d+(\)\])/$1#Masked#$2/

set hive.test.currenttimestamp=2025-05-02 10:05:03;
set hive.support.concurrency=true;
set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- HiveFilter(condition=[=(CAST($1):DOUBLE, 2.0250E3)])
--! qt:replace:/(.*,\s)[0-9.E]+(\)\])/$1#Masked#$2/
set hive.test.currenttimestamp=2025-04-02 10:05:03;

create table t1 (a int) partitioned by (p_year string);

Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ HiveProject(month=[$0], con_usd=[$2])
HiveJoin(condition=[=($0, $1)], joinType=[inner], algorithm=[none], cost=[not available])
HiveProject(month=[$0])
HiveUnion(all=[true])
HiveProject(month=[CAST(#Masked#):INTEGER])
HiveProject(month=[CAST(202503):INTEGER])
HiveTableScan(table=[[default, test1]], table:alias=[test1])
HiveProject($f0=[CAST(202110):INTEGER])
HiveFilter(condition=[=($0, 202110)])
Original file line number Diff line number Diff line change
@@ -35,6 +35,6 @@ POSTHOOK: Input: default@emps
#### A masked pattern was here ####
CBO PLAN:
HiveProject(ename=[$0], birth_epoch_secs=[$1])
HiveFilter(condition=[<=(CAST($1):BIGINT, #Masked#)])
HiveFilter(condition=[<=(CAST($1):BIGINT, 1746205503)])
HiveTableScan(table=[[default, emps]], table:alias=[emps])

Original file line number Diff line number Diff line change
@@ -24,6 +24,6 @@ POSTHOOK: Input: default@t1
#### A masked pattern was here ####
CBO PLAN:
HiveProject(a=[$0], p_year=[$1])
HiveFilter(condition=[=(CAST($1):DOUBLE, #Masked#)])
HiveFilter(condition=[=(CAST($1):DOUBLE, 2.0250E3)])
HiveTableScan(table=[[default, t1]], table:alias=[t1])

Loading
Oops, something went wrong.