Commit Graph

2351 Commits

Author SHA1 Message Date
7a0734dbd6 [feature](Nereids): InferPredicates support In (#29458) 2024-01-05 21:25:30 +08:00
7402fee1fc [feature](function) support ip function ipv6_string_to_num(_or_default, _or_null), inet6_aton (#28361) 2024-01-05 19:24:45 +08:00
2b3e75bb27 [fix](Nereids) exists should not return null (#29435) 2024-01-05 18:13:21 +08:00
77fbbf63ed [test](Nereids): add more test for eliminate inner join by fk (#29390) 2024-01-05 16:21:24 +08:00
0eee560f94 [enhancement](Nereids): add test for push filter through operator (#27294) 2024-01-05 15:48:23 +08:00
64696829d1 [fix](Nereids) mark join should not eliminate join when child is empty (#29409) 2024-01-05 11:55:37 +08:00
c0f63915f7 [chore](test) make configuartion of parallel scan be fuzzy (#29356) 2024-01-05 11:09:43 +08:00
7a4ef90110 [Improve](regresstests)add test cases for array functions (#28492) 2024-01-04 20:39:35 +08:00
43b19fd99e [docs](timezone) refactor docs of timezone 2024-01-04 20:20:40 +08:00
abd9000368 [Feat](Nereids) add distribute hint to leading hint (#28562)
add distribute hint to leading hint, we can use leading like:
/*+ leading(t1 broadcase{t2 t3}) */ after this commit
2024-01-04 17:51:06 +08:00
Pxl
441fb49345 [Bug](load) fix load failed on stream load tvf into agg state (#28420)
fix load failed on stream load tvf into agg state
2024-01-04 17:38:31 +08:00
Pxl
d8a08dad90 [Bug](mark-join) fix wrong result on mark join + other conjunct (#29321)
fix wrong result on mark join + other conjunct
2024-01-04 11:58:39 +08:00
0d0b9d64dd [improve](move-memtable) add move memtable too many segments fault injection (#29342) 2024-01-03 21:27:54 +08:00
afaefa3a9e [regression](decimalv2) add schema change test case for decimalv2 (#29474) 2024-01-03 21:02:10 +08:00
49a3bab399 [fix](nereids) fix aggregate function roll up when expression arguments is not equals (#29256)
when aggregate function roll up, we should check the qury and mv function argument is equal
such as mv def and query sql as following, it should not rewrite success, because the  bitmap_union_basic field augument is
not equal to the `count(distinct case when o_shippriority > 10 and o_orderkey IN (1, 3) then o_custkey else null end)`  field in query

mv def:
>      select l_shipdate, o_orderdate, l_partkey, l_suppkey, 
>            sum(o_totalprice) as sum_total, 
>            max(o_totalprice) as max_total, 
>            min(o_totalprice) as min_total, 
>            count(*) as count_all, 
>            bitmap_union(to_bitmap(case when o_shippriority > 1 and o_orderkey IN (1, 3) then o_custkey else null end)) as bitmap_union_basic 
>           from lineitem 
>           left join orders on lineitem.l_orderkey = orders.o_orderkey and l_shipdate = o_orderdate 
>            group by 
>         l_shipdate, 
>         o_orderdate, 
>          l_partkey, 
>         l_suppkey;

query sql:

>             select t1.l_partkey, t1.l_suppkey, o_orderdate,
>           sum(o_totalprice),
>            max(o_totalprice),
>           min(o_totalprice),
>           count(*),
>            count(distinct case when o_shippriority > 10 and o_orderkey IN (1, 3) then o_custkey else null end)
>            from (select * from lineitem where l_shipdate = '2023-12-11') t1
>            left join orders on t1.l_orderkey = orders.o_orderkey and t1.l_shipdate = o_orderdate
>            group by
>            o_orderdate, 
>            l_partkey,
>            l_suppkey;
2024-01-03 18:58:18 +08:00
d19530c4c2 [Fix](Nereids) fix leading hint dealing with big brace (#29405)
Co-authored-by: libinfeng <libinfeng@selectdb.com>
2024-01-03 18:13:38 +08:00
2a9b4a0f76 [enhancement](paimon)support predict for null and notnull (#29134) 2024-01-03 12:53:39 +08:00
f54f79515c [Bug](fix) str_to_date "" should be null (#29402) 2024-01-03 08:25:22 +08:00
1edf5b31b6 [Regression-test](wal) Add fault injection case for wal mem back pressure (#29298) 2024-01-03 00:06:52 +08:00
5db496d844 [Improve](Variant) make output stable (#29389) 2024-01-02 20:29:17 +08:00
af39217d14 [improve](agg)support push down min/max on unique table (#29242) 2024-01-02 19:40:23 +08:00
04abcc1245 [cases](index compaction)Add index compaction cases (#29393)
Add some cases for index compaction:

1. index compaction with duplicate key table
2. index compaction with unique key table 
3. optimize index compaction with multi segments in one  inverted index
2024-01-02 18:29:09 +08:00
Pxl
d474d4e701 [Bug](rollup) fallback and disable tulpe when rollup select failed on old planner (#29226)
* fallback and disable tulpe when rollup select failed on old planner

* add case
2024-01-02 17:54:56 +08:00
4692a62e47 [fix](planner)nullable info of agg node's intermediate and output slots should be same (#29315) 2024-01-02 15:53:28 +08:00
cc6013bfab [fix](partial update) Fix error message when doing strict mode partial update on a table with column that is non-nullable and has no default value #29218 2023-12-31 11:18:37 +08:00
e500b42142 Disable global cancel policy in regression test (#29335) 2023-12-30 14:35:17 +08:00
2c4e52e44e [fix](es catalog) only es_query function can push down to ES (#29320)
Issue Number: close #29318 
1. Only push down `es_query` function to ES
2. Add null check where ES query result not have `_source` or `fields` fields.
2023-12-30 09:33:26 +08:00
c3c34e10bb [feature](executor) Add some check when create workload group/workload schedule policy (#29236) 2023-12-29 15:41:16 +08:00
9fc613de9c [fix](nereids) Fix query rewrite by mv fail when self join (#29227)
Fix query rewrite by mv fail when self join, after fix query like following can be rewrited

def materialized view = """
    select 
    a.o_orderkey,
    count(distinct a.o_orderstatus) num1,
    SUM(CASE WHEN a.o_orderstatus = 'o' AND a.o_shippriority = 1 AND a.o_orderdate = '2023-12-08' AND b.o_orderdate = '2023-12-09' THEN a.o_shippriority+b.o_custkey ELSE 0 END) num2,
    SUM(CASE WHEN a.o_orderstatus = 'o' AND a.o_shippriority = 1 AND a.o_orderdate >= '2023-12-01' AND a.o_orderdate <= '2023-12-09' THEN a.o_shippriority+b.o_custkey ELSE 0 END) num3,
    SUM(CASE WHEN a.o_orderstatus = 'o' AND a.o_shippriority in (1,2) AND a.o_orderdate >= '2023-12-08' AND b.o_orderdate <= '2023-12-09' THEN a.o_shippriority-b.o_custkey ELSE 0 END) num4,
    AVG(a.o_totalprice) num5,
    MAX(b.o_totalprice) num6,
    MIN(a.o_totalprice) num7
    from
    orders a
    left outer join orders b
    on a.o_orderkey = b.o_orderkey
    and a.o_custkey = b.o_custkey
    group by a.o_orderkey;
"""

def query = """
    select 
    a.o_orderkey,
    SUM(CASE WHEN a.o_orderstatus = 'o' AND a.o_shippriority = 1 AND a.o_orderdate = '2023-12-08' AND b.o_orderdate = '2023-12-09' THEN a.o_shippriority+b.o_custkey ELSE 0 END) num2,
    SUM(CASE WHEN a.o_orderstatus = 'o' AND a.o_shippriority = 1 AND a.o_orderdate >= '2023-12-01' AND a.o_orderdate <= '2023-12-09' THEN a.o_shippriority+b.o_custkey ELSE 0 END) num3,
    SUM(CASE WHEN a.o_orderstatus = 'o' AND a.o_shippriority in (1,2) AND a.o_orderdate >= '2023-12-08' AND b.o_orderdate <= '2023-12-09' THEN a.o_shippriority-b.o_custkey ELSE 0 END) num4,
    AVG(a.o_totalprice) num5,
    MAX(b.o_totalprice) num6,
    MIN(a.o_totalprice) num7
    from
    orders a
    left outer join orders b
    on a.o_orderkey = b.o_orderkey
    and a.o_custkey = b.o_custkey
    group by a.o_orderkey;
"""
2023-12-29 13:45:33 +08:00
2794427e7f [enhancement](Nereids): refactor eliminating inner join by foreign key (#28816) 2023-12-29 13:41:54 +08:00
d2dc12bed5 [fix](nereids)exists subquery should handle top level scarlar agg correctly (#29135) 2023-12-29 09:45:20 +08:00
c3679a2750 [opt](Nereids) derive physical properties of Project and Filter (#29171) 2023-12-29 07:08:12 +08:00
7d44c5a1f1 [FIX](map)fix element_at in old planner make fe exception and regress cases from ck #29241 2023-12-29 01:00:47 +08:00
ce13a1d951 [fix](nereids) make runtime filter order stable #29203 2023-12-29 01:00:27 +08:00
69c90b1640 [fix](group commit)fix group commit regresstion test (#29079) 2023-12-29 00:50:22 +08:00
feebe3e6fb [FIX](literal) fix expression literal error #29157 2023-12-28 23:08:01 +08:00
e64c5687f2 [fix](index compaction)support compact multi segments in one index (#28889) 2023-12-28 21:33:21 +08:00
5129ab5738 [fix](decimalv2) fix decimalv2 agg errors (#29246) 2023-12-28 21:17:16 +08:00
c8a0d3e03c [fix](invert index) fix error handling for match_regexp resulting in an empty match. (#29233) 2023-12-28 19:58:41 +08:00
5171a77f9e [fix](Nereids): merge Offset in Limit Translator (#29100) 2023-12-28 15:32:45 +08:00
Pxl
118775f913 [Bug](schame-change) fix wrong result after reorder mor table (#29045)
* fix wrong result after reorder mor table

* update
2023-12-28 14:57:31 +08:00
Pxl
c98489fc09 [Feature](materialized-view) support visitBitmapUnion mv rewrite (#29200)
* support visitBitmapUnion rewrite

* add case
2023-12-28 14:56:33 +08:00
29a7c0d677 [pipelineX](scan) ignore storage data distribution by default (#29192) 2023-12-28 14:54:09 +08:00
82a8232c8a [fix](expr) Fix BE core dump while common expr filter delete condition column (#29107)
pred column also needs to be filtered by expr, exclude delete condition column, delete condition column not need to be filtered, query engine does not need it, after _output_column_by_sel_idx, delete condition materialize column will be erase at the end of the block.
Eg:
delete from table where a = 10;
select b from table;
a column only effective in segment iterator, the block from query engine only contain the b column, so no need to filter a column by expr.
2023-12-28 11:39:54 +08:00
8a169b9906 [case](regression) Test enable pipeline load (#28172)
Co-authored-by: qinhao <qinhao@newland.com.cn>
2023-12-28 10:49:19 +08:00
0436013baf [fix](decimal) fix cast decimal overflow and add test cases for casting decimalv2 to decimalv3 (#29165) 2023-12-27 20:58:37 +08:00
5f71691401 [fix](read) fix unexpected overflow of uninitialized column data in VStatisticsIterator::next_batch (#29141) 2023-12-27 20:58:02 +08:00
9715db61d4 [FIX](complextype)fix count func with complex type (#28873) 2023-12-27 20:38:44 +08:00
51bd402b58 [fix](planner) Fix delete statement on MOR unique table (#28968)
add conditions for mor table removed in #26776
2023-12-27 12:59:15 +08:00
8e358617c7 [opt](nereids)expr normalize after filter pushdown (#28743)
normalize expression after filter push down
2023-12-27 11:37:36 +08:00