Commit Graph

6005 Commits

Author SHA1 Message Date
378d9e7336 [Colo][Scan] delete the colo scan code (#30584) 2024-01-31 23:53:39 +08:00
7d9313c807 [revert](Nereids): revert#30578 #30422 (#30594)
* Revert "[fix](Nereids): don't log edit log when replaying"
* Revert "[fix](Nereids) create constraint write edit log in lock scope (#30422)"
This reverts commit 27a12d37acbe2ca807f7ce56125ad4773d89f584.
2024-01-31 23:53:39 +08:00
6376b24300 [fix](Nereids): don't log edit log when replaying (#30578)
* don't log edit log when replaying
2024-01-31 23:53:39 +08:00
b983cbd02d [fix](audit) add workload_group to audit log table (#30470)
1. Missing workload_group column in audit table
2. Extract the definition of internal schema's tables into a new class
3. Fix bug that audit loader has no authorization to load data to audit_table, introduced from #29790
4. Fix bug that audit_log can not be modified to 3 replica because it is partitioned table
2024-01-31 23:53:39 +08:00
7838ba6d4e [feature](journal) Add a method to write a set of journals in batch (#30582)
* [feature](journal) Add a method to write a set of journals in batch (#30380)

* [feature](journal) Add log and metric to improve the observability of journal batch (#30401)
2024-01-31 23:53:39 +08:00
c810df55c5 [fix](Nereids) create constraint write edit log in lock scope (#30422)
write edit log in lock scope to ensure the order of log sequence.

To avoid the sequence like:
```
add primary key pk1
add foreign key ref pk1
log foreign key
log primary key
```
2024-01-30 15:33:40 +08:00
9e63015e2f [fix](mtmv)resolve task tvf concurrent modification exception #30497
LinkedList is not thread safe and there may be issues with concurrent queries and writes. Change it to ConcurrentLinkedQueue

Caused by: java.util.ConcurrentModificationException
	at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966) ~[?:1.8.0_131]
	at java.util.LinkedList$ListItr.next(LinkedList.java:888) ~[?:1.8.0_131]
	at org.apache.doris.tablefunction.MetadataGenerator.taskMetadataResult(MetadataGenerator.java:694) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.tablefunction.MetadataGenerator.getMetadataTable(MetadataGenerator.java:119) ~[doris-fe.jar:1.2-SNAPSHOT]
	at org.apache.doris.service.FrontendServiceImpl.fetchSchemaTableData(FrontendServiceImpl.java:2195) ~[doris-fe.jar:1.2-SNAPSHOT]
	... 13 more
2024-01-30 15:32:43 +08:00
53c624ffa0 [feat](Nereids): support alias when eliminate join for partially mv rewritting #30498 2024-01-30 15:32:43 +08:00
4648902350 [bugfix](iceberg)fix read NULL with date partition (#30478)
* fix date

* fix date

* add case
2024-01-30 15:32:43 +08:00
b712f0b810 [improvement](index)add index_id column in show index stmt (#30431) 2024-01-30 15:32:42 +08:00
589e83561c [Fix](jdk17) support start FE with JDK17 (#29658) (#30485)
Issue Number: close #30484

problem:
gson will use Java's reflection mechanism to generate a default Adapter, but JDK17 is prohibited from visiting such an access.

solution:
gson has provided solutions since 2.9.1, which can bypass this problem: Add support for reflection access filter by Marcono1234 · Pull Request #1905 · google/gson

We need to upgrade the gson version and use this solution
2024-01-30 15:31:22 +08:00
f0a35f6e2d [regression test](schema change) add some case for agg col (#30479) 2024-01-30 15:30:39 +08:00
f17d29090e [feat](Nereids): drop foreign key after dropping primary key that is referenced by the foreign key (#30417) 2024-01-29 19:03:48 +08:00
a0100ce29f Reduce AlterJobV2/TruncateTable binlog size (#30505)
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
2024-01-29 19:03:48 +08:00
15c625dcbc [fix](Nereids) should not generate same exprId for diff column when sink (#30501) 2024-01-29 19:03:48 +08:00
0f81d2d533 [FIX](complextype)fix complex type nested version type but not hide version (#30419) 2024-01-29 19:03:47 +08:00
afab713048 [fix](Nereids) query mv column directly (#30444) 2024-01-29 19:03:47 +08:00
dce6c8bd65 [Improvement](Nereids) Support aggregate rewrite by materialized view with complex expression (#30440)
materialized view definition is

>            select
>            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)) >cnt_1,
>            bitmap_union(to_bitmap(case when o_shippriority > 2 and o_orderkey IN (2) then o_custkey else null end)) as >cnt_2
>            from lineitem
>            left join orders on l_orderkey = o_orderkey and l_shipdate = o_orderdate;
   

the query following can be rewritten by materialized view above.
it use the aggregate fuction arithmetic calculation in the select 

>            select
>            count(distinct case when O_SHIPPRIORITY > 2 and o_orderkey IN (2) then o_custkey else null end) as cnt_2,
>            (sum(o_totalprice) + min(o_totalprice)) * count(*),
>            min(o_totalprice) + count(distinct case when O_SHIPPRIORITY > 2 and o_orderkey IN (2) then o_custkey else null >end)
>            from lineitem
>            left join orders on l_orderkey = o_orderkey and l_shipdate = o_orderdate;
2024-01-29 19:03:47 +08:00
e36f390134 [fix](nereids)window expression's window frame may lost in NormalizeToSlot (#30378) 2024-01-29 19:03:47 +08:00
036e17dcb0 [test](nereids)add fe ut for SimplifyArithmeticComparisonRule (#27644) 2024-01-29 19:03:47 +08:00
3b85e3de1b [fix](planner)avg function may use wrong decimal precision and scale (#30364) 2024-01-29 19:03:47 +08:00
90c0806178 [fix](query state) Print correct DML state (#30489) 2024-01-29 19:03:47 +08:00
b91a338bce [enhance](auto-partition) Constrain dynamic & auto partition use same interval unit if both enable (#30426) 2024-01-29 19:03:47 +08:00
3354ac48f7 [enhance](mtmv)add version and version time for table (#30437)
Add version to record data changes in the table

Scope of impact: 

- Transaction related operations
- drop partition
- replace partition
2024-01-29 19:03:47 +08:00
db094da081 [fix](common) If the properties in DDL is not provided, the mysql client will lost connection (#30256) 2024-01-29 19:03:47 +08:00
779a9a1fbb [opt](planner) use string for varchar in ctas if original table is not olap (#30323) 2024-01-29 19:03:47 +08:00
930e3bb701 [feature](Nereids): double eager support mix function (#30468) 2024-01-29 19:03:47 +08:00
dcfccde3d1 [fix](Nereids) create table should check column name format (#30421) 2024-01-29 19:02:46 +08:00
5a13c7596a [fix](nereids)should normalize mv column's name before matching prefix keys (#27464) 2024-01-29 19:02:46 +08:00
7667fe8570 [Improve)(Variant) do not allow fall back to legacy planner (#30430) 2024-01-29 19:02:46 +08:00
658c869aac [improvement](mtmv)mtmv support partition by hms table (#29989) 2024-01-29 19:02:46 +08:00
15a68924f5 Add note for workload group when upgrade Doris (#30457) 2024-01-29 19:02:45 +08:00
bfdc41d37b [fix](ccr) handle large binlog (#30435) 2024-01-28 18:25:31 +08:00
92dc395f9a [fix](nereids)should always call visitBoundFunction first when binding ElementAt function (#30469) 2024-01-28 18:25:31 +08:00
0433b8730d [Feature](profile)add shuffle send rows/bytes #30456 2024-01-28 18:25:08 +08:00
b1a9370004 [fix](glue)support access glue iceberg with credential list (#30473)
merge from #30292
2024-01-28 18:23:07 +08:00
e9218861ec fix code format 2024-01-27 10:40:27 +08:00
4f915129a9 [pipelineX](localexchange) Add local exchange before TabletFunction (#30446)
* [pipelineX](localexchange) Add local exchange before TabletFunction

* update
2024-01-27 10:29:41 +08:00
5d7543b30b [feature](ranger) Support Apache ranger for Doris (#27864)
For usage, see:
5d340ce24f/docs/zh-CN/docs/admin-manual/privilege-ldap/ranger.md

For range-doris-plugin, see:
https://github.com/morningman/ranger/tree/doris-plugin

To support ranger, there are several other modification:

1. Support `show resources like "pattern"`
2. Support `show workload group like "pattern"`
3. Support `show schemas like "pattern"`
2024-01-27 10:29:38 +08:00
2284575afa [opt](nereids)set flag to indicate if bloom filter size is calculated by ndv (#30278)
set flag to indicate if bloom filter size is calculated by ndv
2024-01-27 10:07:41 +08:00
5986d5415e [opt](Nereids) make runtime filter target support expression (#30131)
the target expression should be:
1. only one numeric slot, or
2. cast for any data type

example:
select * from T1 join T2 on abs(T1.a) = T2.a
RF T2.a->abs(T1.a)
2024-01-27 10:07:10 +08:00
e576412a56 fix iceberg table get split fail when with date type conjuct (#30162) 2024-01-27 09:13:21 +08:00
d51cbf00f4 [minor fix](use_fix_replica) handle set use_fix_replica < 0 (#30358) 2024-01-27 09:11:44 +08:00
5d2b011a8d [fix](ES catalog) throw exception when ES meta track failed (#30409) 2024-01-27 09:11:02 +08:00
04237f60e0 [feature](Nereids): eager aggreagate support mix agg function (#30400) 2024-01-27 09:11:02 +08:00
1fdb323154 [pipeline](load) p0 load failed in pipeline stream load (#30438) 2024-01-27 09:11:02 +08:00
713798d549 [feature](nereids)support mark join (#30133)
Co-authored-by: Jerry Hu <mrhhsg@gmail.com>
2024-01-27 09:09:53 +08:00
f25af15842 [Fix](Nereids) Fix lost predicate when query has a filter at the right input of the outer join (#30374)
materialized view def is as following:
>        select l_shipdate, o_orderdate, l_partkey, l_suppkey, o_orderkey  
>        from lineitem 
>        left join (select * from orders where o_orderdate = '2023-12-10' ) t2 
>        on lineitem.l_orderkey = t2.o_orderkey;
    
the query as following, should add filter `o_orderdate = '2023-12-10'` on mv when query rewrite by materialized view
>        select l_shipdate, o_orderdate, l_partkey, l_suppkey, o_orderkey 
>         from lineitem 
>         left join orders 
>        on lineitem.l_orderkey = orders.o_orderkey 
>         where o_orderdate = '2023-12-10' order by 1, 2, 3, 4, 5;
2024-01-27 09:09:02 +08:00
8543167195 [Nereids](Variant) Implement variant type and support new sub column access method (#30348)
* [Nereids](Variant) Implement variant type in Variant and support new sub column access method

The query SELECT v["a"]["b"] from simple_var WHERE cast(v["a"]["b"] as int) = 1

1. During the binding stage, the expression element_at(var, "xxx") is transformed into a SlotReference with a specified path. This conversion is tracked in the StatementContext, where the parent slot is the primary key and the paths are secondary keys. This structure, known as subColumnSlotRefMap in the StatementContext, helps to eliminate duplicates of the same slot derived from identical paths.

2. A new rule, BindSlotWithPaths, is introduced in the analysis stage. This rule is responsible for converting slots with paths into their respective slot suppliers. To ensure that slots with paths are correctly associated with the appropriate LogicalOlapScan, an additional mapping, slotToRelation, is added to the StatementContext. This mapping links the top-level slot to its corresponding relation (i.e., LogicalOlapScan). Consequently, subsequent slots with paths can determine the correct LogicalOlapScan to merge with and modify accordingly.
2024-01-27 09:09:02 +08:00
Pxl
1c449d3204 [Improvement](priv) move check priv out of analyze (#30403)
move check priv out of analyze
2024-01-27 09:09:02 +08:00