Commit Graph

199 Commits

Author SHA1 Message Date
15bdfa446c [case](mtmv)fix alter job case (#41326) (#41500)
pick: https://github.com/apache/doris/pull/41326
2024-10-10 00:11:50 +08:00
03ef90b96e [regression-test](feature) support skip non-concurrent (#41493)
…1021)

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->
2024-09-30 12:47:18 +08:00
f422b82e24 [Fix](Nereids) fix append_trailing_char_if_absent function return null (#41157)
cherry-pick: https://github.com/apache/doris/pull/40820
example: select append_trailing_char_if_absent('it','a') would return
null in original design, it can not return null when folding constant on
fe any time
2024-09-26 16:18:12 +08:00
4967635e54 [test](mtmv) Fix regression test unstable (#40871) (#41082)
## Proposed changes

commitId: da6ac0c5
pr: https://github.com/apache/doris/pull/40871
2024-09-20 23:49:23 +08:00
7a24719f48 [enhance](mtmv) Refuse to execute insert overwrite on the same table … (#40992)
…(#40558)

pick: https://github.com/apache/doris/pull/40558
2024-09-19 22:18:46 +08:00
782973ee77 [fix](auth)Http api check auth (#40688) (#40865)
pick: https://github.com/apache/doris/pull/40688
2024-09-15 23:50:54 +08:00
45e35e8a99 [improvement](mtmv) Optimize get available mv logic to avoid unnecessary rewrite (#39734) (#40136)
## Proposed changes

commitId: 55ed1277
pr: https://github.com/apache/doris/pull/39734
2024-08-30 08:02:27 +08:00
688b97e183 [enhancement](Nereids) support reuse sql cache between different comment (#40065)
cherry pick from #40049
2024-08-28 22:15:55 +08:00
799ad1d398 [fix](mv) Fix test create table like test unstable (#39305) (#40013)
ddl_p0/test_create_table_like_nereids.groovy test result is unstable.
Should wait util rollup join finished then we can compare the explain
rollup result.

## Proposed changes

commitId: 3b7b29b8
pr: https://github.com/apache/doris/pull/39305
2024-08-28 18:42:35 +08:00
e0b65d0ff4 [fix](regression) Fix creating db for downstream url #39601 (#39818)
cherry pick from #39601
2024-08-23 16:15:19 +08:00
40500f2b10 [branch-2.1](thirdparty) upgrade arrow to 17.0.0 (#39773)
pick #38572
2024-08-22 18:35:32 +08:00
935d0eb110 [cherry-pick](branch-2.1) [Bug](http-api) fix core dump on API check_rpc_channel coz exec_env not initialized #39519 (#39692)
…rpc_channel coz exec_env not initialized #39519

## Proposed changes

Issue Number: close #xxx
backport #39519  #39520
2024-08-22 00:42:12 +08:00
2b1aa05370 pick some pr from to branch21 #38115 #38008 #37929 (#38940)
## Proposed changes

pr: https://github.com/apache/doris/pull/38115
commitId: 2b29288c

pr: https://github.com/apache/doris/pull/38008
commitId: c6b924da

pr: https://github.com/apache/doris/pull/37929
commitId: d44fcdc5
2024-08-07 10:19:41 +08:00
fcb4483ed1 [chore](sql) Forbid show hidden columns and create table with hidden column (#38796) (#38924)
Forbid show hidden columns and create table with hidden column
2024-08-06 14:24:41 +08:00
ee47ef8826 [Fix](regression) fix regression sql which has schema change (#37941) (#38456)
cherry-pick #37941 to branch-2.1
2024-07-31 22:31:38 +08:00
d17b196459 [regression](s3) add default conf for s3 releated cases (#37952) (#38472)
replace COS with OSS in the TeamCity pipeline to improve stability

pick from master #37952

---------

## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->
2024-07-29 18:01:27 +08:00
a04583c9a1 [enhancement](regression-test) schema reordering case to 2.1 (#38131)
Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
2024-07-23 19:42:37 +08:00
fdc8b454d2 [chore](backup) Remove delete_if_exists properties for creating repository (#38192)
delete_if_exists is a temporary solution introduced in #25847, to avoid
concurrent testing conflicts.

Cherry-pick #38190
2024-07-23 11:09:02 +08:00
d4d1688df2 [improve](test)Using Awaitility instead of Thread.sleep (#37812) (#38108)
## Proposed changes

Awaitility: Waits until a specific condition is met, which makes the
tests more reliable and less prone to intermittent failures. It ensures
that the test only proceeds when the expected condition is true.
Thread.sleep: Introduces a fixed delay, which can lead to flaky tests.
If the condition is met sooner than the sleep time, the test
unnecessarily waits. Conversely, if the condition is met after the sleep
time, the test will fail.

(cherry picked from commit 8d249a2562b15825a06a53a5a530a532a0ca2454)

## Proposed changes

Issue Number: close #37812

<!--Describe your changes.-->
2024-07-19 15:32:03 +08:00
90466cacc5 [regression](case) fix bad base (#38084)
## Proposed changes

replace hardcode s3 properties
<!--Describe your changes.-->

---------

Co-authored-by: stephen <hello-stephen@qq.com>
2024-07-18 23:52:06 +08:00
46c06b3d97 [enhancement](regression-test) sync unique case to 2.1 (#37272)
Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
2024-07-16 16:59:33 +08:00
47096f2083 [test](regression) add cases for data quality error url (#34987) (#37777)
cherry-pick #34987
2024-07-16 11:12:52 +08:00
f65d1c4011 [chore](ci) rm repeat function name (#37579)
## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->
2024-07-10 11:44:32 +08:00
08b3b73c3a [fix](regression) Fix regression run in cloud use non-root user #34340 (#37279)
cherry pick from #34340
2024-07-09 20:48:30 +08:00
19eb9decba [chore](ci) add isCloudMode (#37518)
## Proposed changes

Issue Number: close #xxx

<!--Describe your changes.-->

Co-authored-by: stephen <hello-stephen@qq.com>
2024-07-09 14:09:16 +08:00
16890feb9a [chore](suite) Add target_sql_return_maparray (#37421)
Cherry-pick #37303
2024-07-08 18:58:55 +08:00
4f00b41796 [chore](suites) Allow change db name in get_ccr_body (#37424)
Cherry-pick #37324.
2024-07-08 17:47:43 +08:00
fe75cbc927 [case](udf) Only one backend, skip scp udf file (#36810) (#36964)
backport #36810
2024-06-28 16:31:30 +08:00
22cb7b8fcb [improvement](compaction) be do not compact invisible version to avoid query error -230 #28082 (#36222)
cherry pick from #28082
2024-06-27 13:45:21 +08:00
785a1f49f5 [fix](txn) Fix coordidator be restart not abort txn #35342 (#36437)
cherry pick from #35342
2024-06-25 13:35:01 +08:00
e0088df3b3 [case](udf) support run java udf case on cluster with multiple BEs (#… (#36742)
…36669)

Issue Number: close #xxx

<!--Describe your changes.-->

Co-authored-by: stephen <hello-stephen@qq.com>
2024-06-24 17:32:08 +08:00
fbc82e0253 [opt](log) refine the BE logger (#35942) (#35988)
bp #35942
2024-06-06 22:25:22 +08:00
373d9ab988 [enhance](mtmv)add truncate table case (#35599)
truncate table or truncate partition,mtmv should can detect data change
2024-05-30 19:59:37 +08:00
a03309c7e5 Revert "[regression-test](framework) add log for scpFiles (#35570)"
This reverts commit 6fd3916168af24357e12bc1b36cdbeb64985bbf7.
2024-05-30 11:24:29 +08:00
eefea4c7e6 [fix](mtmv) Fix partition mv rewrite result wrong (#35236)
this is brought by https://github.com/apache/doris/pull/33800
if mv is partitioned materialzied view,
the data will be wrong by using the hited materialized view when the
paritions in related base partiton table are deleted, created and so on.
this fix the problem.

if **SET enable_materialized_view_union_rewrite=true;** this will use
the materializd view and make sure the data is corrent
if **SET enable_materialized_view_union_rewrite=false;** this will query
base table directly to make sure the data is right
2024-05-29 20:30:23 +08:00
6fd3916168 [regression-test](framework) add log for scpFiles (#35570) 2024-05-29 15:06:46 +08:00
473e14ca82 [chore](backup) log backup/restore job during replay (#35234) 2024-05-24 16:23:57 +08:00
853dbdcb00 [Feature](PreparedStatement) implement general server side prepared (#33807) 2024-05-10 22:10:11 +08:00
3ae3f9d6e1 [opt](catalog) support using loading cache for db/table list in external catalog (#33610) (#34596)
bp #33610
2024-05-09 17:50:39 +08:00
222289697d [improve](regression) Support qt_target_sql (#34236) (#34270) 2024-04-29 11:50:35 +08:00
50f9d47e96 [test](hive) run suite cases both in hive2 and hive3 (#33874) (#34156)
bp #33874

Co-authored-by: 苏小刚 <suxiaogang223@icloud.com>
2024-04-26 13:48:09 +08:00
450f443413 [fix](decommission) fix cann't decommission mtmv (#33823) 2024-04-25 12:01:44 +08:00
60253c827c [fix](nereids) do not push RF into nested cte (#33769) 2024-04-20 20:08:00 +08:00
15f8014e4e [enhancement](Nereids) Enable parse sql from sql cache and fix some bugs (#33867)
* [enhancement](Nereids) Enable parse sql from sql cache (#33262)

Before this pr, the query must pass through parser, analyzer, rewriter, optimizer and translator, then we can check whether this query can use sql cache, if the query is too long, or the number of join tables too big, the plan time usually >= 500ms.

This pr reduce this time by skip the fashion plan path, because we can reuse the previous physical plan and query result if no any changed. In some cases we should not parse sql from sql cache, e.g. table structure changed, data changed, user policies changed, privileges changed, contains non-deterministic functions, and user variables changed.

In my test case: query a view which has lots of join and union, and the tables has empty partition, the query latency is about 3ms. if not parse sql from sql cache, the plan time is about 550ms

## Features
1. use Config.sql_cache_manage_num to control how many sql cache be reused in on fe
2. if explain plan appear some plans contains `LogicalSqlCache` or `PhysicalSqlCache`, it means the query can use sql cache, like this:
```sql
mysql> set enable_sql_cache=true;
Query OK, 0 rows affected (0.00 sec)

mysql> explain physical plan select * from test.t;
+----------------------------------------------------------------------------------+
| Explain String(Nereids Planner)                                                  |
+----------------------------------------------------------------------------------+
| cost = 3.135                                                                     |
| PhysicalResultSink[53] ( outputExprs=[c1#0, c2#1] )                              |
| +--PhysicalDistribute[50]@0 ( stats=3, distributionSpec=DistributionSpecGather ) |
|    +--PhysicalOlapScan[t]@0 ( stats=3 )                                          |
+----------------------------------------------------------------------------------+
4 rows in set (0.02 sec)

mysql> select * from test.t;
+------+------+
| c1   | c2   |
+------+------+
|    1 |    2 |
|   -2 |   -2 |
| NULL |   30 |
+------+------+
3 rows in set (0.05 sec)

mysql> explain physical plan select * from test.t;
+-------------------------------------------------------------------------------------------+
| Explain String(Nereids Planner)                                                           |
+-------------------------------------------------------------------------------------------+
| cost = 0.0                                                                                |
| PhysicalSqlCache[2] ( queryId=78511f515cda466b-95385d892d6c68d0, backend=127.0.0.1:9050 ) |
| +--PhysicalResultSink[52] ( outputExprs=[c1#0, c2#1] )                                    |
|    +--PhysicalDistribute[49]@0 ( stats=3, distributionSpec=DistributionSpecGather )       |
|       +--PhysicalOlapScan[t]@0 ( stats=3 )                                                |
+-------------------------------------------------------------------------------------------+
5 rows in set (0.01 sec)
```

(cherry picked from commit 03bd2a337d4a56ea9c91673b3bd4ae518ed10f20)

* fix

* [fix](Nereids) fix some sql cache consistence bug between multiple frontends (#33722)

fix some sql cache consistence bug between multiple frontends which introduced by [enhancement](Nereids) Enable parse sql from sql cache #33262, fix by use row policy as the part of sql cache key.
support dynamic update the num of fe manage sql cache key

(cherry picked from commit 90abd76f71e73702e49794d375ace4f27f834a30)

* [fix](Nereids) fix bug of dry run query with sql cache (#33799)

1. dry run query should not use sql cache
2. fix test sql cache in cloud mode
3. enable cache OneRowRelation and EmptyRelation in frontend to skip parse sql

(cherry picked from commit dc80ecf7f33da7b8c04832dee88abd09f7db9ffe)

* remove cloud mode

* remove @NotNull
2024-04-19 15:22:14 +08:00
46a258dc85 [improvement](binlog)Support inverted index format v2 in CCR (#33415) 2024-04-17 23:42:12 +08:00
9a3b19d21e [fix](cases) Add check status timeout for backup/restore cases (#32975) 2024-04-11 13:10:24 +08:00
0e99926b28 (httpaction) log response of http (#33270) 2024-04-10 15:58:14 +08:00
ff990eb869 [enhancement](Nereids) refactor expression rewriter to pattern match (#32617)
this pr can improve the performance of the nereids planner, in plan stage.

1. refactor expression rewriter to pattern match, so the lots of expression rewrite rules can criss-crossed apply in a big bottom-up iteration, and rewrite until the expression became stable. now we can process more cases because original there has no loop, and sometimes only process the top expression, like `SimplifyArithmeticRule`.
2. replace `Collection.stream()` to `ImmutableXxx.Builder` to avoid useless method call
3. loop unrolling some codes, like `Expression.<init>`, `PlanTreeRewriteBottomUpJob.pushChildrenJobs`
4. use type/arity specified-code, like `OneRangePartitionEvaluator.toNereidsLiterals()`, `PartitionRangeExpander.tryExpandRange()`, `PartitionRangeExpander.enumerableCount()`
5. refactor `ExtractCommonFactorRule`, now we can extract more cases, and I fix the deed loop when use `ExtractCommonFactorRule` and `SimplifyRange` in one iterative, because `SimplifyRange` generate right deep tree, but `ExtractCommonFactorRule` generate left deep tree
6. refactor `FoldConstantRuleOnFE`, support visitor/pattern match mode, in ExpressionNormalization, pattern match can criss-crossed apply with other rules; in PartitionPruner, visitor can evaluate expression faster
7. lazy compute and cache some operation
8. use int field to compare date
9. use BitSet to find disableNereidsRules
10. two level loop usually faster then build Multimap when bind slot in Scope, so I revert the code
11. `PlanTreeRewriteBottomUpJob` don't need to clearStatePhase any more

### test case
100 threads parallel continuous send this sql which query an empty table, test in my mac machine(m2 chip, 8 core), enable sql cache
```sql
select  count(1),date_format(time_col,'%Y%m%d'),varchar_col1
from tbl
where  partition_date>'2024-02-15'  and (varchar_col2 ='73130' or varchar_col3='73130') and time_col>'2024-03-04'
  and  time_col<'2024-03-05'
group by date_format(time_col,'%Y%m%d'),varchar_col1
order by date_format(time_col,'%Y%m%d') desc, varchar_col1 desc,count(1) asc
limit 1000
```

before this pr: 3100 peak QPS, about 2700 avg QPS
after this pr: 4800 peak QPS, about 4400 avg QPS

(cherry picked from commit 7338683fdbdf77711f2ce61e580c19f4ea100723)
2024-04-10 14:59:45 +08:00
a7c8abe58c [feature](nereids) support common sub expression by multi-layer projections (fe part) (#33087)
* cse fe part
2024-04-10 14:53:56 +08:00
39b768b9ea [branch-2.1](thirdparty) upgrade arrow to 15.0.2 #32827 2024-03-27 08:35:40 +08:00