Commit Graph

2366 Commits

Author SHA1 Message Date
d50c8b6d3a [Improvement](nereids) Query rewrite by mv support bitmap_union and bitmap_union_count roll up (#29418)
Query rewrite by mv support bitmap_union and bitmap_union_count roll up, aggregate functions which supports roll up is listed as following:

| 查询中函数            | 物化视图中函数      | 函数上卷后              |
|------------------|--------------|--------------------|
| max              | max          | max                |
| min              | min          | min                |
| sum              | sum          | sum                |
| count            | count        | sum                |
| count(distinct ) | bitmap_union | bitmap_union_count |
| bitmap_union | bitmap_union | bitmap_union|
| bitmap_union_count | bitmap_union | bitmap_union_count |

this depends on  https://github.com/apache/doris/pull/29256
2024-01-12 11:44:21 +08:00
87023d3b7a [Fix](inverted index) fix memory leak in inverted index when encountering fault (#29676) 2024-01-12 11:44:21 +08:00
a2da434e3b [refactor](Nereids): refactor PredicatePropagation & support to infer Equal Condition (#29644) 2024-01-12 11:40:57 +08:00
3cd1c7745a [fix](jdbc catalog) Fix the precision of decimal type mapping to 0 (#29407) 2024-01-12 11:39:57 +08:00
eea657a610 [rf](nereids)prune rf for external db according to jump count (#29634)
* prune some rf for external db
2024-01-12 11:37:16 +08:00
97ed06a92c [regression-test](Variant) fix unstable case (#29648) 2024-01-12 11:36:45 +08:00
53f1521308 [feature](inverted index)Support failover when index compaction failed (#29553) 2024-01-12 11:33:15 +08:00
59d7f64360 [Fix](Nereids) fix pipelineX distribute expr list with child output expr ids (#29621) 2024-01-08 10:46:27 +08:00
17cf4ab2c1 [case](regression) streamload publish timeout (#29457)
Co-authored-by: qinhao <qinhao@newland.com.cn>
2024-01-07 19:50:16 +08:00
1ea51e9f20 [Feature](group commit) Support table property "group commit data bytes" (#29484) 2024-01-07 19:46:42 +08:00
eb4c389b0b [feature](function) support ip functions isipv4string and isipv6string (#28556) 2024-01-07 13:03:11 +08:00
df43b671de [case](regression) Backup & restore with view (#29573) 2024-01-07 00:03:22 +08:00
734b258e15 [feature](create table) show create table print storage medium (#29080) 2024-01-06 22:40:51 +08:00
911635fac6 [feature](nereids) judge if the join is at bottom of join cluster (#29383) 2024-01-06 17:15:19 +08:00
5789b7e380 [fix](jin) add datetimev2 precision (#29528) 2024-01-06 13:35:26 +08:00
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