Commit Graph

7599 Commits

Author SHA1 Message Date
e57419fc9e [feature](nereids) Date add and Date sub related functions (#14753)
## date_add series
- DATE_ADD
- DAYS_ADD
- ADDDATE
- TIMESTAMPADD

## date_sub series
- DATE_SUB
- DAYS_SUB
- SUBDATE

## NOTE
1. For DAYS_XXX, time unit is omissible, by default the time unit is DAY
2. no TIMESTAMPSUB
2022-12-12 21:34:30 +08:00
c8551e0cad [Bug](compile) Fix compiling error if set ENABLE_STACKTRACE (#15004) 2022-12-12 20:41:10 +08:00
9886fcbc62 [ehancement](nereids) Waits read lock up to 1 minute (#15012) 2022-12-12 20:32:26 +08:00
b5c0d4870d [fix](nereids)fix bug of elt and sub_replace function (#14971) 2022-12-12 17:37:36 +08:00
33bd9eb85e [fix](nereids) Support syntax of nested CTE (#14962) 2022-12-12 17:03:44 +08:00
affc57bee7 [enhancement](pipeline) support jdbc scan, jdbc sink, odbc scan and odbc sink node for pipeline. (#14986)
support jdbc scan, jdbc sink, odbc scan and odbc sink node for pipeline.
2022-12-12 17:03:22 +08:00
0a16f11435 [enhancement](Nereids) add RelationId to unboundRelation (#14693)
add RelationId to unboundRelation and refactor some ut used RelationUtil to allocate next RelationId.
2022-12-12 16:24:08 +08:00
38570312dd [feature](split_by_string)support split by string function (#13741) 2022-12-12 15:22:30 +08:00
75d88b5a8f [improvement](vertical_compaction) reduce segments load in vertical merger (#14900) 2022-12-12 15:06:46 +08:00
Pxl
7c242fe03e [Chore](phmap) upgrade phmap to 1.3.8 (#14965)
upgrade phmap to 1.3.8
2022-12-12 11:44:41 +08:00
5d1051f8d0 [enhancement](function) Remove useless functions in fe (#14837) 2022-12-12 11:26:36 +08:00
33349c3419 [feature](function)Support negative index for function split_part (#13914) 2022-12-12 09:56:09 +08:00
614d7273f5 [typo](docs) fix get starting (#14870)
* [typo](doc)Fix Utility Statements Doc
2022-12-12 09:31:20 +08:00
9e0e376a72 [fix](Nereids): fix push filter through outer join in ReorderJoinRule. (#14952) 2022-12-12 00:38:21 +08:00
5fe5f596f2 [fix](nereids) non-slotreference expr in order by lead to plan failed (#14895) 2022-12-12 00:08:05 +08:00
f3aea7f0f0 [Enhancement](status) Unify error code and enable customed err msg for BE internal errors (#14744) 2022-12-11 23:33:18 +08:00
c4a1f4816c [ehancement](nereids) read lock table when analyze and generate query plan (#14733) 2022-12-11 23:25:19 +08:00
7fb695b51d [Pipeline](select node) Support select node on pipeline engine (#14928) 2022-12-11 21:31:32 +08:00
afcacc0a13 [bugfix](compaction) fix compaction trigger (#14981)
fix bug that when disable_auto_compaction=true but still trigger compaction
2022-12-11 18:26:00 +08:00
8c406c5e59 [Bug](DictoryColumn) reverse the _codes.size() replace _reserve_size (#14984) 2022-12-11 18:25:18 +08:00
ef46b580d0 [Vectorized](operator) support analytic eval operator (#14774) 2022-12-10 19:32:11 +08:00
4c6458108c [fix](fe-meta) NPE in DataProperty when upgrading to 1.2.x (#14976) 2022-12-10 18:46:08 +08:00
0b945e4ee3 [fix](csv-reader) fix be crash when reading invalid value (#14951) 2022-12-10 18:45:47 +08:00
181aadd5d3 [fix](information_schema) fix messy code of CHECK_TIME column of informatio_schema.tables (#14915) 2022-12-10 18:45:25 +08:00
6f9afbd74f [fix](Nereids): just allow crossjoin empty condition. (#14893) 2022-12-10 15:32:49 +08:00
b7453f6f09 [pipeline](mysqlsink) support mysql table sink (#14982) 2022-12-10 13:16:53 +08:00
68092fe514 [pipeline](NLJ) support nested loop join for pipeline (#14966) 2022-12-10 00:20:16 +08:00
ef1bb9819a [feature-wip](MTMV) Support mapping the partition rule of base table to the materialized view (#14930)
When we create a materialized view for multiple tables, users may not figure out the partition rule for the materialized view, because the query result can be too complex. If the query result doesn't match one of the partition rules, the insertion will fail.

We can resolve this issue by mapping the partition rule of base table to the materialized view. As a result, users don't need specify the partition rules and query results are all valid because they are retrieved from the partitions of the base table.

## Use case

mysql> CREATE TABLE t1 (pk INT NOT NULL, v1 INT SUM) PARTITION BY RANGE(pk) (
    ->   PARTITION p1 VALUES LESS THAN ('10'),
    ->   PARTITION p2 VALUES LESS THAN ('90')
    -> )
    -> DISTRIBUTED BY HASH(pk)
    -> PROPERTIES ('replication_num' = '1');
Query OK, 0 rows affected (0.04 sec)

mysql> CREATE TABLE t2 (pk INT NOT NULL, v2 INT SUM) PARTITION BY LIST(pk) (
    ->   PARTITION odd VALUES IN ('10', '30', '50', '70', '90'),
    ->   PARTITION even VALUES IN ('20', '40', '60', '80')
    -> )
    -> DISTRIBUTED BY HASH(pk)
    -> PROPERTIES ('replication_num' = '1');
Query OK, 0 rows affected (0.02 sec)

mysql> CREATE MATERIALIZED VIEW mv BUILD IMMEDIATE REFRESH COMPLETE
    -> KEY (mpk) PARTITION BY (t1.pk) DISTRIBUTED BY HASH(mpk) PROPERTIES ('replication_num' = '1')
    -> AS SELECT t1.pk AS mpk, v1, v2 FROM t1, t2 WHERE t1.pk = t2.pk;
Query OK, 0 rows affected (0.10 sec)

mysql> SHOW CREATE TABLE mv;
+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Materialized View | Create Materialized View                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| mv                | CREATE MATERIALIZED VIEW `mv`
BUILD IMMEDIATE REFRESH COMPLETE ON DEMAND
KEY(`mpk`)
PARTITION BY RANGE(`mpk`)
(PARTITION p1 VALUES [("-2147483648"), ("10")),
PARTITION p2 VALUES [("10"), ("90")))
DISTRIBUTED BY HASH(`mpk`) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"in_memory" = "false",
"storage_format" = "V2",
"disable_auto_compaction" = "false"
)
AS SELECT `t1`.`pk` AS `mpk`, `v1` AS `v1`, `v2` AS `v2` FROM `default_cluster:dev`.`t1` , `default_cluster:dev`.`t2` WHERE `t1`.`pk` = `t2`.`pk`; |
+-------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
2022-12-09 22:47:21 +08:00
wxy
af50461211 [fix](statistics) fix CpuTimeMS in audit log when enable_vectorized_engine=true. (#14853)
Co-authored-by: wangxiangyu@360shuke.com <wangxiangyu@360shuke.com>
2022-12-09 21:13:05 +08:00
f5aa5c1d01 [fix](statistics) Fix NPE when update analysis job status #14892 2022-12-09 21:12:36 +08:00
22e9f5cc33 [typo](docs)fix the FE&BE config document (#14969) 2022-12-09 21:11:30 +08:00
9eeb8b8711 [Bugfix](Jsonb) fix jsonb load in unique key model (#14958)
* [Bugfix](Jsonb) fix jsonb load in unique key model

Register JSONB to `replace_load` agg function

* fix test
2022-12-09 21:10:14 +08:00
Pxl
4c27ee2584 [Bug](predicate) fix undefined behavior on in list predicate #14961 2022-12-09 21:09:54 +08:00
0c8fdc90fb [pipeline](union) support union operator (#14963) 2022-12-09 19:55:40 +08:00
4611947920 [Pipeline](Operator) Add schema scan node operator (#14955) 2022-12-09 19:55:03 +08:00
0ec218108d [enhancement](remote) support local cache GC at the granularity of cache files (#14920)
* [enhancement](remote) support local cache GC at the granularity of cache files

* update

* update

* update
2022-12-09 17:35:23 +08:00
8d17eea22b [pipeline](mysqlscan) support mysql scan node (#14949) 2022-12-09 16:25:29 +08:00
8c02f19302 [chore](regression) use correct bucket path in regression conf (#14960) 2022-12-09 16:20:27 +08:00
0aa32ec1af [typo](docs)optimize the BE config document (#14957) 2022-12-09 16:05:15 +08:00
9d96242242 [typo](docs)optimize the FE config document (#14899)
* optimize the FE config document
2022-12-09 16:04:49 +08:00
93b281b44b [feature](Nereids) support select except syntax (#14851)
Support syntax: select * except(v1, v2) from t;
2022-12-09 15:54:26 +08:00
b213ce6ffd [Bug](pipeline) Fix double prepare on pipeline engine (#14959) 2022-12-09 14:35:34 +08:00
873b128fde [feature](pipeline) add inersect/except operators (#14868) 2022-12-09 14:13:48 +08:00
5a1c7f6314 [improvement](analytic) improve memory counter (#14890) 2022-12-09 14:13:17 +08:00
ec24a56956 [Exec][Pipeline] Remove AggContext's lock (#14901)
* [Exec][Pipeline] Remove AggContext's lock

* fix lock location
2022-12-09 14:11:28 +08:00
9d36931038 [Refactor](NLJ) refactor the nested loop join node (#14911)
* [Refactor](NLJ) refactor the nested loop join node

* change the logic of alloc/release resource
2022-12-09 14:10:26 +08:00
dffa3c0db2 [enhancement](memory) Support query memroy overcommit #14948
Add conf enable_query_memroy_overcommit

If true, when the process does not exceed the soft mem limit, the query memory will not be limited; when the process memory exceeds the soft mem limit, the query with the largest ratio between the currently used memory and the exec_mem_limit will be canceled.

If false, cancel query when the memory used exceeds exec_mem_limit, same as before.
2022-12-09 14:09:05 +08:00
00f44257e2 [feature-wip](file-reader) Merge hdfs reader to the new file reader (#14875) 2022-12-09 13:21:59 +08:00
20f2abb3d4 [vectorized](pipeline) support assert num rows operator (#14923) 2022-12-09 09:39:29 +08:00
b311ebef6c [pipeline](refactor) do some refactor for code and comments (#14934) 2022-12-09 09:08:28 +08:00