Skip to content

Commit

Permalink
inject statistic
Browse files Browse the repository at this point in the history
  • Loading branch information
seawinde committed Nov 6, 2024
1 parent 2dcdb40 commit f8d0cea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ suite("agg_on_none_agg") {
sql """analyze table lineitem with sync;"""
sql """analyze table partsupp with sync;"""

// inject column statistic
sql """alter table orders modify column o_orderkey set stats ('row_count'='8')"""
sql """alter table lineitem modify column l_orderkey set stats ('row_count'='5')"""
sql """alter table partsupp modify column ps_partkey set stats ('row_count'='2')"""

// query used expression is in mv
def mv1_0 = """
select case when o_shippriority > 1 and o_orderkey IN (4, 5) then o_custkey else o_shippriority end,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,25 @@ suite ("partition_curd_union_rewrite") {
insert into orders values
(1, 1, 'ok', 99.5, '2023-10-17', 'a', 'b', 1, 'yy'),
(1, 1, 'ok', 99.5, '2023-10-17', 'a', 'b', 1, 'yy'),
(1, 1, 'ok', 99.5, '2023-10-17', 'a', 'b', 1, 'yy'),
(2, 2, 'ok', 109.2, '2023-10-18', 'c','d',2, 'mm'),
(2, 2, 'ok', 109.2, '2023-10-18', 'c','d',2, 'mm'),
(2, 2, 'ok', 109.2, '2023-10-18', 'c','d',2, 'mm'),
(3, 3, 'ok', 99.5, '2023-10-19', 'a', 'b', 1, 'yy'),
(3, 3, 'ok', 99.5, '2023-10-19', 'a', 'b', 1, 'yy'),
(3, 3, 'ok', 99.5, '2023-10-19', 'a', 'b', 1, 'yy');
"""

sql """
insert into lineitem values
(1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-17', '2023-10-17', '2023-10-17', 'a', 'b', 'yyyyyyyyy'),
(1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-17', '2023-10-17', '2023-10-17', 'a', 'b', 'yyyyyyyyy'),
(1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-17', '2023-10-17', '2023-10-17', 'a', 'b', 'yyyyyyyyy'),
(2, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-18', '2023-10-18', '2023-10-18', 'a', 'b', 'yyyyyyyyy'),
(2, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-18', '2023-10-18', '2023-10-18', 'a', 'b', 'yyyyyyyyy'),
(2, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-10-18', '2023-10-18', '2023-10-18', 'a', 'b', 'yyyyyyyyy'),
(3, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-10-19', '2023-10-19', '2023-10-19', 'c', 'd', 'xxxxxxxxx'),
(3, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-10-19', '2023-10-19', '2023-10-19', 'c', 'd', 'xxxxxxxxx'),
(3, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-10-19', '2023-10-19', '2023-10-19', 'c', 'd', 'xxxxxxxxx');
"""

Expand Down

0 comments on commit f8d0cea

Please sign in to comment.