Commit Graph

5755 Commits

Author SHA1 Message Date
3ebd6e1649 [feat](stats) Support delete expired auto analysis tasks (#19922) 2023-05-25 12:25:11 +08:00
e04b9cb47e [vectorized](function) fix array_map funtion return type maybe get wrong (#19320) 2023-05-25 11:30:28 +08:00
c49060a50b [fix](Nereids) the rule of fold constant for logical operator (#20017)
the rule of constant folding on Logical Operator is:
true and true -> true
true and false -> false
false and false -> false
true and x -> x
false and x -> false
null and true -> null
null and false -> false
null and null -> null
null and x -> null and x

true or true -> true
true or false -> true
false or false -> false
true or x -> true
false or x -> false or x
null or true -> true
null or false -> null
null or null -> null
null or x -> null or x
2023-05-25 11:21:12 +08:00
8149b757c4 [Feature](Nereids)support insert into select command (#18869)
support insert the ret-value of a query into a table with `partition`, `with label`, `cols` tags:

```
insert into t partition (p1, p2)
with label label_1
(c1, c2, c3)
[hint1, hint2]
with cte as (
  select * from src
)
select k1, k2, k3 from cte
```

we create new class: InsertIntoTableCommand, Unbound/Logical/PhysicalOlapTableSink to describe the command of insert and the olapTableSink for Nereids. 
We make UnboundOlapTableSink in parsing phase and bind it, then implement and translate the node to OlapTableSink.
Then we run the command with a transaction.
2023-05-25 10:44:41 +08:00
4610f26a6e [fix](auth)fix row policy use alias error (#19976)
Issue Number: close #19975
2023-05-25 09:10:31 +08:00
Pxl
f9a4a04bdb [fix](Nereids) npe when one row relation contain aggregate function (#19974)
mysql [test]>select sum(1);
ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: null
2023-05-25 09:09:50 +08:00
f881a2336b [Bug](regression) fix DCHECK failed in not enable pipeline engine (#20010) 2023-05-24 23:51:25 +08:00
1dd3a4ed3a [fix](Nereids) fix unstable regression test cases and some bugs (#19999)
Fix bugs:
1. should return the other side child of Or if current side is NULL after constant fold
2. Lead should has three parameters, remove the default value ctors

Not enable Nereids case under nereids_p0
1. nereids_p0/join/sql
2. nereids_p0/sql_functions/horology_functions/sql

Should disble Nereids explicitly because the result is not same
1. query_p0/sql_functions/horology_functions/sql
2. query_p0/stats/query_stats_test.groovy
3. query_profile/test_profile.groovy

Unstable regression test case
1. nereids_syntax_p0/join.groovy
2023-05-24 20:34:01 +08:00
2b3db8f2a8 [Bug](functions) Fix functions for array type with nested decimalv3 (#19993) 2023-05-24 16:51:34 +08:00
d0a3cdfe1a [enhancement](error message) print query id when query timeout (#19972)
In regression test, there are many query timeout, but we do not know the query id, and it is too hard to use the sql text to find the query id in audit log. So that I add query id during query timeout.
---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-05-24 14:40:33 +08:00
4603a60650 [opt](Nereids) give the easy understand error message when the window func misses the parameters (#19957)
For the new optimizer, if the window func misses the parameter. It will not give an understandable error message. So add the error message.
2023-05-24 14:18:22 +08:00
70f2e8ff80 [fix](nereids)enable decimalv3 by default for nereids (#19906) 2023-05-24 13:36:24 +08:00
f14e6189a9 [feature](load-refactor) Unfied mysql load use InsertStmt (#19571) 2023-05-24 12:09:16 +08:00
b4669eaeba [Improve](complex-type)add switch for array/struct/map nesting complex type (#19928)
Now we not support array/map/struct nesting each other for many action in be , If we do prohibit it in fe, we will meet many undefined action in be , so I just add switch to prohibit nesting complex type . When we fully support , can make it able.
Issue Number: close #xxx
2023-05-24 11:39:53 +08:00
a2d660a86c [typo](doc) fix some typo (#19414) 2023-05-23 23:32:39 +08:00
a6674bb7b1 [regression](nereids) tpcds sf100 plan shape regression cases (#19913) 2023-05-23 18:48:00 +08:00
2596d68424 [fix](schema change) Change table state to NORMAL by SchemaChangeJob instead of SchemaChangeHandler (#19838)
fix problem:
If there is an unfinished schema change job (job-2), and before this time, another schema change job (job-1) of the same table has been finished.
Then restart fe, will replay edit log (pending log and waiting_txn log) for job-2, and the table's state is set to SHCEMA_CHANGE, but when loadAlterJob after replayJournal, will add job-1 to schema change handler, and then run the job-1 will set the table to NORMAL because of job-1 is done, but at this point, the job-2 is doing runWaitingTxnJob, in this function will check table's state, if not normal will throw exception, not change the job's state, and cannot cancel the job because the table is not under schema change.
2023-05-23 18:23:12 +08:00
8b184cc5ef [bug](compile) fix fe compile error #19946
Fix fe maven package has a version conflict for package grpc-core.
2023-05-23 18:20:48 +08:00
c88ba85e10 [Bug](schema-change) fix varchar can not change to datev2 #19952 2023-05-23 18:18:55 +08:00
6f511ac859 [fix](s3)fix s3 resource check (#19933)
fix s3 resource check:

ERROR 1105 (HY000): Unexpected exception: org.apache.doris.common.DdlException: errCode = 2, detailMessage = Missing [AWS_ACCESS_KEY] in properties.

we should use new properties to check s3 available
2023-05-23 16:20:07 +08:00
7247ac9b75 [fix](Nereids) join reorder lead to circle in memo (#19935)
If we have join as the root node, then after some join reorder join, the root Group in Memo will have a GroupExpression including LogicalProject as its plan and the children is its ownerGroup.
This PR add a rewrite rule to ensure we have a Project on the top of the top Join of plan to avoid circle in Memo.
2023-05-23 15:22:32 +08:00
ebe3f6ec42 [refactor](routineload)Refactored routineload to improve scalability (#19834)
- The data source parameters are sunk into the specific data source class
- Simplify some code logic to reduce code complexity
- Provide a data source factory class to extract public logic
- Code that removes tests from production code. We should not include code for testing purposes in any production code.
2023-05-23 14:05:47 +08:00
4398b91576 [Fix](multi catalog)Change all partition names to lower case (#19816)
Iceberg table partition name may contain upper case characters, for example: City=xxx, Nation=xxx.
But in Doris, all column names are in lower case. Here we transfer the partition name to lower case to keep consist with column name.
2023-05-23 09:31:31 +08:00
633989c78e [fix](Nereids): commute non-inner join for DPHyp (#19929) 2023-05-23 09:30:50 +08:00
bd74890cf7 [fix](multi-catalog) JDBC Catalog Unknown UNSIGNED type of mysql, type: [DOUBLE] (#19912) 2023-05-23 09:29:57 +08:00
3dcdadcea6 [Improvement](function) support decimalv3 for function least and greatest (#19931) 2023-05-22 22:48:44 +08:00
Pxl
e9223f6a19 [Feature](aggregation) add agg_state define and ddl support (#19824)
add agg_state define and ddl support
2023-05-22 11:45:53 +08:00
76dc5841dc [opt](nereids)compute runtime filter size by the ndv of build side (#18803) 2023-05-22 10:38:11 +08:00
7c539575c7 [refactor](hudi) remove hudi external table (#19908)
Hudi external table is deprecated since 1.2.
We should remove it now.
Recommend to use "multi-catalog" feature to connect to Hudi.

User can not create Hudi external table.
When restarting FE, all hudi external table will still be replayed but can not be read. And when doing checkpoint, all these tables will be discarded.
2023-05-22 09:02:34 +08:00
33fd965b5c [feature-wip](resouce-group) Supports memory soft isolation of resource group (#19802)
create resource groups name properties(
    'enable_memory_overcommit' = 'true' // whether to enable memory soft isolation
)
2023-05-21 19:33:57 +08:00
a7f3bfec89 [refactor](cluster)(step-2) remove cluster related to Backend (#19842) 2023-05-21 09:00:35 +08:00
777bdce5a5 [minor](clone) add more debug log for tablet scheduler (#19892)
Sometimes I find that the tablet scheduler can not schedule tablet, and with no more info for debugging.
So I add some debug log for this process.
No logic is changed.
2023-05-20 15:59:26 +08:00
8b9813663d [test](executor)add crud regression test for resource group (#19659)
dd crud regression test for resource group (#19659)
2023-05-20 13:49:02 +08:00
499f443779 [feature](iceberg) Support read iceberg data on gcs (#19815) 2023-05-20 12:40:03 +08:00
HB
1b119704f8 [Enhancement] show total transactions in show proc "/transactions" (#19492)
In a scenario where multiple DBs are simultaneously imported with high concurrency, a significant number of transactions will be generated. Without a summary field, we cannot clearly see how many transactions there are in the current cluster. Therefore, I have enhanced this point.

```
mysql> show proc "/transactions";
+-------+-----------------------------------+-----------------------+
| DbId     | DbName                                             | RunningTransactionNum |
+-------+-----------------------------------+-----------------------+
| 10002   | default_cluster:xxxx                         | 0                                     |
| 14005   | default_cluster:__internal_schema | 0                                     |
| Total     |  2                                                         | 0                                     |
+-------+-----------------------------------+-----------------------+
3 rows in set (0.02 sec)
```
2023-05-20 11:26:28 +08:00
a81db3e984 [improvement](FQDN) broker support fqdn (#19821)
1.broker support fqdn
2.change 'master_only' attr of 'enable_fqdn_mode'
2023-05-20 11:25:58 +08:00
178d6cc529 [improvement](multi-catalog)hms sync event log more info #19887 2023-05-20 08:25:14 +08:00
77dfdfdd50 [Bug][pipeline] Fix regression tpcds failed in nereid planner (#19885) 2023-05-19 22:30:48 +08:00
24b2fab943 [fix](Nereids): BuildAggForUnion forgot to convert Qualifier Type. (#19883) 2023-05-19 22:18:38 +08:00
5547bbbaef [decimalv3](function) support function width_bucket (#19806) 2023-05-19 20:28:59 +08:00
78bcc68ab8 [Fix](Nereids) fix serialize colocate table index concurrent bug (#19862)
When doing serialization of minidump input, we can find that when serializing colocate table index, the size and entry get by the hash map always unmatched when concurrent occur. So a write lock be added to ensure concurrency.
2023-05-19 19:51:22 +08:00
ae1577e95c [improvement](jdbc catalog) set oceanbase mysql mode jdbc param useCursorFetch default true (#19856) 2023-05-19 19:45:22 +08:00
68be81363b [enhance](Nereids): Pushdown Filter Through Project in Post Processor. (#19873)
Originally, PushdownFilterThroughProject is in CBO phase, but it will increase Memo size.
So, we move it into PostProcessor
2023-05-19 19:27:52 +08:00
67dc68630b [Improve](complex-type)improve array/map/struct creating and function with decimalv3 (#19830) 2023-05-19 17:43:36 +08:00
2ab844550f [feature-wip](MTMV) support multi catalog (#19854)
* mtmv support multi catalog

* mtmv support multi catalog
2023-05-19 16:44:55 +08:00
0fc8d2e029 [Bug](decimal) fix variance_samp and avg_weighted #19861 2023-05-19 16:44:36 +08:00
9d54545bac [Fix](inverted index) add datev2/datetimev2 for inverted index column type (#19845)
When we try to query array of datetimev2 column by inverted index, it returns an error like this:

CREATE TABLE `nested` (
 `qid` bigint(20) NULL,
 `tag` array<text> NULL,
 `creationDate` datetime NULL,
 `title` text NULL,
 `user` text NULL,
 `answers.user` array<text> NULL,
 `answers.date` array<datetimev2(0)> NULL,
 INDEX tag_idx (`tag`) USING INVERTED PROPERTIES("parser" = "english") COMMENT '',
 INDEX creation_date_idx (`creationDate`) USING INVERTED COMMENT '',
 INDEX title_idx (`title`) USING INVERTED COMMENT '',
 INDEX user_idx (`user`) USING INVERTED COMMENT '',
 INDEX answers_user_idx (`answers.user`) USING INVERTED COMMENT '',
 INDEX answers_date_idx (`answers.date`) USING INVERTED COMMENT ''
) ENGINE=OLAP
DUPLICATE KEY(`qid`)
COMMENT 'OLAP'
DISTRIBUTED BY HASH(`qid`) BUCKETS 18
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"storage_format" = "V2",
"compression" = "ZSTD",
"light_schema_change" = "true",
"dynamic_schema" = "true",
"disable_auto_compaction" = "false"
); 

mysql> select * from nested.nested where tag match 'java' and `answers.date` element_le '2012-04-08T21:15:33.873Z' limit 10;
ERROR 1105 (HY000): errCode = 2, detailMessage = no function found for MATCH_ELEMENT_LE,`answers.date` MA
2023-05-19 14:57:01 +08:00
f46f0c84b2 [Enhancement](meta) Show remote data usage via SHOW DATA #19533 (#19752)
* [Enhancement](meta) Show remote data usage via SHOW DATA #19533

* [fix] correct some unit test results
2023-05-19 14:23:50 +08:00
c4900eb658 [Bug](DecimalV3) fix decimalv3 functions (#19801) 2023-05-19 14:10:01 +08:00
fcffb1d3de [minor](Nereids): add toString() for LogicalProperties (#19851) 2023-05-19 13:46:47 +08:00