Commit Graph

6380 Commits

Author SHA1 Message Date
c715facafa [fix](window_function) window function first_value/last_value should be always nullable (#26014) 2023-10-27 20:53:48 +08:00
d953e5c8f4 [feature](Nereids): Convert topn(x, 1) to max(x) (#26004) 2023-10-27 18:45:21 +08:00
2464a22ac5 [fix](meta) fix follower sync image timeout after checkpoint. (#26003)
The image file of our cluster reaches 2.3G. After the checkpoint, Followers synchronize the image timeout, resulting in the continuous increase of the bdb directory.

related pr: #25768
2023-10-27 16:58:42 +08:00
165957658a [fix](Nereids) could not run multi group_concat distinct (#25851)
could not run multi group_concat distinct with more than one parameters.
This bug is not just for group_concat, but we usually use literal as
parameters in group_concat. So group_concat brought the problem to light.

In the original logic, we think only distinct aggregate function with
zero or one parameter could run in multi distinct mode. But it is wrong.
We could process all distinct aggregate function with not more than one
input slots.

Think about sql:
```sql
SELECT
  group_concat(distinct c1, ','), group_concat(distinct c2, ',')
FROM t
GROUP BY c3
```
2023-10-27 03:42:00 -05:00
d57fc263cf [fix](Nereids) support create dup table without key (#25954) 2023-10-27 01:57:39 -05:00
4aebe879a6 [feature](Nereids) support complex project in graph simplifier (#26002)
Reject the edge which has an alias when ordering edge
2023-10-27 14:38:54 +08:00
a6d64c6b25 [refine](profilev2) format profilev2 (#25963) 2023-10-27 14:26:38 +08:00
e3dbbed47c [fix](Nereids) query failed when fold constant on be failed (#25982)
we translate expression to legacy one when do fold constant on BE.
some times, we generate invalid expression that cannot be tranlsated.
So, we should catch translate exception to avoid query failed.
2023-10-27 01:22:08 -05:00
deb1ad8264 [enhancement](Nereids) add mode no_backslash_escapes (#25822)
add mode [no_backslash_escapes](https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html)
2023-10-27 00:43:32 -05:00
a3ac8b98b8 [fix](planner)nvl should match function signature in the same way as ifnull (#25849) 2023-10-27 11:13:30 +08:00
8206252e0a [Performance](Nereids): refactor GroupMatching (#25960)
Refactor GroupMatching to improve performance.
2023-10-27 10:56:42 +08:00
fa06c7517a [feature](meta) Add thrift rpc to get db/table/backend meta (#25943)
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
2023-10-27 10:12:58 +08:00
b32557e195 [fix](stats) Fix potential NPE when doing auto analyze (#25908) 2023-10-26 20:47:57 -05:00
f737ba815d [fix](nereids) push down subquery exprs in non-distinct agg functions (#25955) 2023-10-26 20:36:10 -05:00
1e39636fbf [fix](nereids) fix wrong result precision for add/sub (#25751) 2023-10-26 08:28:34 -05:00
9faa6e083b [fix](udf) avoid exception when fail to find udf in replay logic (#25965)
When replaying drop function edit log, the function may not be found, causing runtime exception and
FE will fail to start.
The function SHOULD be exist, but the reason is still unknown.
I change the logic to NOT throw exception if function is not found.
This is a workaround to make sure FE can start, and add some log for later debug.
2023-10-26 08:19:13 -05:00
678dc366e0 [fix](export) fix timeout property not work for export job (#25913)
Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-10-26 18:51:57 +08:00
2679fa4ea7 [improvement](tablet clone) furthur repair replicas should be check even if they are versions catchup (#25551) 2023-10-26 18:14:40 +08:00
c1d64a7128 [Feature](datatype) Add IPv4/v6 data type for doris (#24965) 2023-10-26 17:33:28 +08:00
1ba8a9bae4 [feature-wip](executor)Fe send topic info to be (#25798) 2023-10-26 15:52:48 +08:00
2229d82acd [fix](Nereids) should not put bound expr into unbound group by list (#25938)
we put bound expr into unbound group by list by mistake.
This will lead to bind twice on some exprssion.
Since binding is not idempotent, below exception will be thrown for sql

```sql
select k5 / k5 as nu, sum(k1) from test group by nu order by nu nulls first
```

```
Caused by: org.apache.doris.nereids.exceptions.AnalysisException: Input slot(s) not in child's output: k5#5 in plan: LogicalProject[176] ( distinct=false, projects=[(cast(k5#5 as DECIMALV3(16, 10)) / k5#5) AS `nu`#14, sum(k1)#15], excepts=[] ), child output is: [nu#16, sum(k1)#15]
plan tree:
LogicalProject[176] ( distinct=false, projects=[(cast(k5#5 as DECIMALV3(16, 10)) / k5#5) AS `nu`#14, sum(k1)#15], excepts=[] )
+--LogicalAggregate[168] ( groupByExpr=[nu#16], outputExpr=[nu#16, sum(k1#1) AS `sum(k1)`#15], hasRepeat=false )
   +--LogicalProject[156] ( distinct=false, projects=[k1#1, (cast(k5#5 as DECIMALV3(16, 10)) / k5#5) AS `nu`#16], excepts=[] )
      +--LogicalOlapScan ( qualified=default_cluster:regression_test_nereids_syntax_p0.test, indexName=test, selectedIndexId=503229, preAgg=OFF, Aggregate function sum(k1) contains key column k1. )
    at org.apache.doris.nereids.rules.analysis.CheckAfterRewrite.checkAllSlotReferenceFromChildren(CheckAfterRewrite.java:108) ~[classes/:?]
```
2023-10-26 02:31:20 -05:00
d6c64d305f [chore](log) Add log to trace query execution #25739 2023-10-26 14:09:25 +08:00
6ce1087c23 [enhancement](stats) Limit analyze info count (#25576)
Each analyze job info and task info would not exceed 20000 after this PR. User could adjust this by FE conf param: analyze_record_limit
2023-10-26 13:46:28 +08:00
d896debbe7 [fix](stats) Escape string when insert stats (#25815)
Co-authored-by: AKIHA <cyborgz1999@example.com>
2023-10-26 13:39:41 +08:00
af3e6f604a [fix](nereids) prune partition bug in pattern ColA <> ColB #25769
in predicate rewrite phase, we eliminate some conjuncts which contains un-interested columns.
for example: T (a, b) partition by (a)
interest cols: a
uninsterest cols: b
for parition prune,
filter "a=1 and a>b" is equivalent to "a=1",
filter "a=1 or a>b" is equivalent to "TRUE"
2023-10-26 12:06:37 +08:00
9aa9894b11 [fix](Nereids) create table default value error msg is diff with lagacy planner (#25897)
old error msg:
default value precision: 2023-10-25 14:45:30.292 can not be greater than type precision: DATETIME(1)

new error msg:
default value precision: CURRENT_TIMESTAMP(3) can not be greater than type precision: DATETIME(1)
2023-10-25 22:36:14 -05:00
855956e503 [opt](Nereids) let column dist info check msg same with legacy planner (#25925) 2023-10-25 22:35:24 -05:00
d7d284b4f8 [fix](Nereids) fix '' and "" in string literal (#25752)
'' represents ' in sql standard
"" represents " in sql standard
2023-10-26 11:18:21 +08:00
f322ad277d [fix](nereids) PushdownAliasThroughJoin may lost required columns from parent node (#25835) 2023-10-25 22:03:41 -05:00
a079ba763c [fix](tvf) fix 'frontends()' inconsistent with return 'show proc /fro… (#25885) 2023-10-26 09:47:58 +08:00
0dcbc5ee18 [fix](backup) missing use_path_style properties for minio (#25803)
Follow #25496.
In #25496, I fixed the issue that the aws s3 properties are invalid when passing from FE to BE.
But it missed the `use_path_style` property, which is useful for minio access.
This PR fix it.
2023-10-26 01:19:28 +08:00
0fb57a6db8 [fix](meta) add sync new image timeout (#25768)
Add timeout config for sync
2023-10-25 23:46:18 +08:00
7f66be84d5 [fix](Outfile) Infer the column name if the column is expression in select into outfile (#25854)
This pr do two things:
1. Infer the column name if the column is expression in `select into outfile`. The rule for column name generation can be refered in pr: #24990 
2. fix bug that it will core dump if the `_schema` fails to build in the open phase in vorc_transformer.cpp


TODO:
1. Support infer the column name if the column is expression in `select into outfile` in new optimizer(Nereids).
2023-10-25 22:49:04 +08:00
04a70ecaf0 [fix](info_db) do not fetch external catalog's info in information_schema (#25844)
There is FE config `infodb_support_ext_catalog`, the default is false.
Which means that the tables in `information_schema` database will not return info of external catalog.
Because if there are too many external catalogs in Doris with lots of db/tbl (like running p0 regression tests),
querying infomation_schema db will take a long time and may causing rpc timeout.

And there is an unresolved issue that if thrift rpc timeout, the BE may be crashed in ASAN mode.
So to avoid this issue(not fix yet), this PR mainly changes:

if `infodb_support_ext_catalog` is false,
1. query info of external catalog in information_schema db is not allowed, such as

	show database like "external_catalog";
	show tables like "xxx"

2. select * from information_schema.tbl will not contains external catalogs' info

3. For external p0 regression test pipeline, set `infodb_support_ext_catalog` to true to run the tests related to external catalog
2023-10-25 21:34:36 +08:00
018abdb679 [fix](fe-ut) fix npe of fe ut (#25904) 2023-10-25 19:56:00 +08:00
3e21e4bdc2 [feature](CANCEL-ALTER-SYSTEM)decommission backend by ids (#25441)
Issue Number: close #23636
2023-10-25 19:49:38 +08:00
01d5901356 [fix](Nereids) cte should support nested name reuse (#25858)
for example:
```sql
with a as (with a as (select * from t) select * from a) select * from a;

with a as (select * from t1), b as (with a as (select * from a) select * from a) select * from b;
```
2023-10-25 18:52:14 +08:00
e8f479882d [pipelineX](local exchange) Add local exchange operator (#25846) 2023-10-25 18:45:02 +08:00
a919ef618d [fix](planner) Fix select table tablet not effective (#25378)
Fix select table tablet not effective, table distributed by random.
If tabletID specified in query does not exist in this partition, skip scan partition.
2023-10-25 18:02:27 +08:00
4bda1650e1 [docs & fix](stats) Fix tablesample init failed and some outdated contents in docs (#25603) 2023-10-25 04:38:00 -05:00
20fa1eff65 [enhancement](Nereids) Filter no data partition after partition prune (#25456) 2023-10-25 04:37:10 -05:00
0eea19403e [fix](stats) analyze specific column only if indicate column in analyze stmt (#25660) 2023-10-25 04:08:10 -05:00
8a03a07339 [feature](Nereids): pull up Project under Limit/TopN (#25866)
If project contains expression-eval, we need pull up through limit, it can improve performance.
2023-10-25 16:44:32 +08:00
693982fd1a [feature](decimal) support decimal256 (#25386) 2023-10-25 15:47:51 +08:00
4f17c2a8b1 [feature](alter backends)backend modify & drop & decommission by ids (#25444) 2023-10-25 14:32:30 +08:00
ae66464d6b [refactor](Nereids) refactor infer predicate rule to avoid lost cast (#25637)
extract slot and literal in comparison predicate. infer new one by equals predicates.
use TypeCoercion to add cast on new comparison predicate to ensure it is correct.

This reverts "[Fix](Nereids) Add cast comparison with slot reference when inferring predicate (#21171)"
commit 58f2593ba1b65713e7b3c1ed39fc84be8cc3ff2c.
2023-10-25 01:12:22 -05:00
3b9ae91910 [Fix](Nereids) fix test leading suite and add tpch shape checking base on leading (#25842)
- fix test leading suite caused by sessionvariable setting error
- add tpch shape checking base on leading
2023-10-25 01:10:14 -05:00
ba75f3457c [opt](Nereids) update first_value and last_value signature (#25790) 2023-10-25 00:49:27 -05:00
4ac82fd367 [opt](Nereids) add group_array as collect_list alias (#25836) 2023-10-25 00:46:40 -05:00
d94ae20d4a [improvement](nereids) support insert into doris_internal_table_id(xxx) (#25722) 2023-10-25 11:12:00 +08:00