Commit Graph

8289 Commits

Author SHA1 Message Date
2beed11256 [Bug](streamload) fix inconsistent load result of be and fe (#20950) 2023-06-21 18:12:51 +08:00
62fb0e642e [chore](dynamic schema) deprecated create dynamic schema table (#21058) 2023-06-21 14:44:57 +08:00
6f20cac1da [bugfix](cooldown) Fix potential deadlock while calling handleCooldownConf (#20975) 2023-06-21 14:44:01 +08:00
Pxl
5f0bb49d46 [Feature](materialized-view) support create mv contain aggstate column (#20812)
support create mv contain aggstate column
2023-06-21 13:06:52 +08:00
fcd778fb4f [Fix](mysql proto) avoid send duplicated OK packet (#21032)
1. The Mysql Go driver has a logic that terminates when it reads an EOF (end-of-file) and expects no data in the buffer. However, the front-end (FE) mistakenly returns an additional OK packet, which causes an exception to be thrown when reading the buffer.

2. Refactor some logic to support full prepared not just in where clause, like 
```
select ?, ? from tbl
```
2023-06-21 12:00:22 +08:00
18beb822a3 [FIX](array-type) fix array string output with fe const expr (#21042)
fe foldconstRule make array() function expr with const literal , and would not pass this array literal to be . but we should make fe array string output format is same with be array string output
2023-06-21 11:52:02 +08:00
ef17289925 [feature](jni) add jni metrics and attach to BE profile automatically (#21004)
Add JNI metrics, for example:
```
-  HudiJniScanner:  0ns
  -  FillBlockTime:  31.29ms
  -  GetRecordReaderTime:  1m5s
  -  JavaScanTime:  35s991ms
  -  OpenScannerTime:  1m6s
```
Add three common performance metrics for JNI scanner:
1. `OpenScannerTime`: Time to init and open JNI scanner
2. `JavaScanTime`: Time to scan data and insert into vector table in java side
3. `FillBlockTime`: Time to convert java vector table to c++ block

And support user defined metrics in java side, for example: `OpenScannerTime` is a long time for the open process, we want to determine which sub-process takes too much time, so we add `GetRecordReaderTime` in java side.
The user defined metrics in java side can be attached to BE profile automatically.
2023-06-21 11:19:02 +08:00
f10258577b [Fix](Planner) Fix group concat with multi distinct and segs (#20912)
Problem:
when use select group_concat(distinct a, 'seg1'), group_concat(distinct b, 'seg2') ... Error would rised
Reason:
Group_concat function regard 'seg' as arguments also, so multi distinct column error would rised
Solved:
let Multi Distinct group_concat function only get first argument as real argument
2023-06-20 21:00:18 +08:00
ca8f51602b [Improvement](multi catalog, statistics)Support two level external statistics cache loader (#20906)
The current column statistic cache loader is to load data from column_statistics olap table.
This pr is to change the cache loader logic to First load from column_statistics olap table, if no data was loaded, then load from table metadata. This is mainly to support fetch statistics data for external catalog using HMS or Iceberg api.
This is the first PR, next pr will implement the fetch logic for different external catalogs.
2023-06-20 16:43:18 +08:00
cb89af49e7 [improvement](replica) donot care last failed version in publish (#21001)
We just care 2 things:
1. If the replica acks right
2. If the replica catches up
2023-06-20 15:57:54 +08:00
0b1bbe4045 [Bugfix](CCR) BinlogTombstone tableId is null when db disable binlog (#20995) 2023-06-20 15:48:47 +08:00
0d80456869 [enhancement](backup) teach fe to acquire a consistent backup between be and fe (#21014) 2023-06-20 15:37:41 +08:00
f4d3f4ae19 [Fix](Nereids) failed to fold date_format() to constant (#20976) 2023-06-20 15:11:25 +08:00
ec34f72204 [enhancement](nereids) log for exception stack of sync analyze (#21013) 2023-06-20 15:11:03 +08:00
6b4a9edbbd [fix](nereids) Fix explain graph with CTE #20997
Add support of MultiCastDataSink
2023-06-20 14:55:21 +08:00
7da3fde89c [Fix](Nereids)cast to datev2 default for Nereids if enable_date_conversion (#20973) 2023-06-20 14:53:20 +08:00
53b2fe5db6 [improvement](jdbc) Set the JDBC connection timeout to be conf (#21000) 2023-06-20 14:23:48 +08:00
74a09fc6e5 [Dependency](fe)Use the release version of hive-catalog (#20921)
Used hive-catalog-shade 1.0.1
2023-06-20 11:53:59 +08:00
1eb4e5bd06 [Fix](Routineload)routine load does not support lowercase data source names (#21005) 2023-06-20 11:44:02 +08:00
923f7edad0 [opt](hudi) using native reader to read the base file with no log file (#20988)
Two optimizations:
1. Insert string bytes directly to remove decoding&encoding process.
2. Use native reader to read the hudi base file if it has no log file. Use `explain` to show how many splits are read natively.
2023-06-20 11:20:21 +08:00
7e01f074e2 [improvement](jdbc mysql) support auto calculate the precision of timestamp/datetime (#20788) 2023-06-20 10:39:34 +08:00
87258a13c4 [enhancement](nereids) Remove useless config option #20905
1. Remove useless config option
2. Fix timeout cancel, before this PR an OlapAnalysisTask would continue running even if it's already timeout.
2023-06-20 10:37:46 +08:00
824bc02603 [Function] Support date function: microsecond() (#20044) 2023-06-20 10:32:54 +08:00
0287cc15f2 [fix](meta) 'clean label from db' does not work (#20625)
When we use a label to load data, this label can not be used twice. But when we execute a sql 'CLEAN LABEL [label] FROM db;', we hope that the same label can be used again.
However, the sql above does not work. This PR is fixing this problem.
2023-06-20 10:25:31 +08:00
d02ecef406 [fix](Nereids): revert push down alias into union (#20991)
revert #20543 to tmp avoid problem
2023-06-20 09:32:26 +08:00
e7b070c9ec [fix](Nereids) subquery not return correct data type (#20985)
if we do type coercion on subquery, it return datatype after type coercion

error info
```
Both side of binary arithmetic is not numeric. left type is DECIMALV3(2, 1) and right type is DECIMAL(27, 9)')
```
2023-06-19 23:44:58 +08:00
5a28b6f9fc [fix](datetime) Fix the error in date calculation that includes constants (#20863)
before

```
mysql> select hours_add('2023-03-30 22:23:45.23452',8);
+-------------------------------------+
| hours_add('2023-03-30 22:23:45', 8) |
+-------------------------------------+
| 2023-03-31 06:23:45                 |
+-------------------------------------+

mysql> select date_add('2023-03-30 22:23:45.23452',8);
+------------------------------------+
| date_add('2023-03-30 22:23:45', 8) |
+------------------------------------+
| 2023-04-07 22:23:45                |
+------------------------------------+

mysql [test]>select hours_add('2023-03-30 22:23:45.23452',8);
+-------------------------------------------+
| hours_add('2023-03-30 22:23:45.23452', 8) |
+-------------------------------------------+
| 2023-03-31 06:23:45.000234                |
+-------------------------------------------+
```

after

```
mysql [test]>select hours_add('2023-03-30 22:23:45.23452',8);
+-------------------------------------------+
| hours_add('2023-03-30 22:23:45.23452', 8) |
+-------------------------------------------+
| 2023-03-31 06:23:45.23452                 |
+-------------------------------------------+
1 row in set (0.01 sec)

mysql [test]>select date_add('2023-03-30 22:23:45.23452',8);
+------------------------------------------+
| date_add('2023-03-30 22:23:45.23452', 8) |
+------------------------------------------+
| 2023-04-07 22:23:45.23452                |
+------------------------------------------+
1 row in set (0.00 sec)

mysql [test]>set enable_nereids_planner=true;
Query OK, 0 rows affected (0.00 sec)

mysql [test]>set enable_fallback_to_original_planner=false;
Query OK, 0 rows affected (0.00 sec)

mysql [test]>select hours_add('2023-03-30 22:23:45.23452',8);
+-------------------------------------------+
| hours_add('2023-03-30 22:23:45.23452', 8) |
+-------------------------------------------+
| 2023-03-31 06:23:45.23452                 |
+-------------------------------------------+
1 row in set (0.03 sec)

mysql [test]>select date_add('2023-03-30 22:23:45.23452',8);
+------------------------------------------+
| days_add('2023-03-30 22:23:45.23452', 8) |
+------------------------------------------+
| 2023-04-07 22:23:45.23452                |
+------------------------------------------+
1 row in set (0.00 sec)
```
2023-06-19 23:44:30 +08:00
e6f50c04f1 [fix](nereids)SubqueryToApply rule lost is null condition (#20971)
* [fix](nereids)SubqueryToApply rule lost is null condition
2023-06-19 23:43:40 +08:00
be8fb68712 [fix](nereids)distribute node missing rows and cost #20943
in dumped memo, distribute node missed estimated rows and cost.
2023-06-19 23:42:01 +08:00
f20ef165fe [opt](Nereids) update join stats derive (#20895)
in hash join condition, some equals are trustable, some are not.
an equal is trustable if one side is almost unique, like primary key. for such equal condition we could estimate more accurate.
the problem is in rewriten q20, the are 2 equal condition, one is trustable, another is not. But we treat both of them as trustable.

Test result:
on tpch100, from 2.2 sec to 0.44 sec
no impact on tpch other queries
no performance impact on tpcds queries
2023-06-19 23:40:44 +08:00
010861b7ec [enhancement](Nereids) Don't write to table_statistics when create sync analyze job anymore #20956
1. Don't write to table_statistics when create sync analyze job anymore since it's meaningless

2. Capture exceptions when creating each system analyze job to avoid the failure of creation of all automatic collection jobs due to a single job creation failure.

3. Mark auto triggered period job's job type as system
2023-06-19 20:00:41 +08:00
08ac55291f [opt](Nereids) change log level to debug to avoid log explode (#20954) 2023-06-19 18:50:06 +08:00
415f1053a4 [minor](progress) do not update progress if job id is not set (#20949) 2023-06-19 18:13:43 +08:00
63b9684696 [Feature](broker-load) Support priority for Broker Load job. (#20628)
Support priority for Broker Load job.
2023-06-19 14:16:48 +08:00
26cca5e00a [Enhancement](tvf) Add frontends table-valued-function (#20857) 2023-06-19 13:57:40 +08:00
170cc46b12 [fix](hive) check hive transactional table's file format (#20888)
Sometimes we meet a hive table with parameter: "transactional" = "true", but format is parquet, which is not supported.
So we need to check the input format for transactional table.
2023-06-19 12:33:00 +08:00
4c6f1de42b [feature](nereids) enable nereids planner by default (#20761)
1. enable nereids planner by default
2. add fuzzy test on enable_nereids_planner
3. fix some ut that result different under legacy planner and nereids
2023-06-19 12:24:47 +08:00
Pxl
85c5d7c6a9 [Chore](materialized-view) add ssb_flat mv test case (#20869)
add ssb_flat mv test case
2023-06-19 10:51:50 +08:00
0bed52d86b [bugfix](inverted index) fix not writing inverted index file if upgrade from old version #20945
The metadata indexes in MaterializedIndexMeta is introduced in 2.0-beta version and it's relied by writing inverted index. When upgrade doris from old version to 2.0-beta, the metadata indexes in MaterializedIndexMeta is empty and no inverted index file will be written.

This PR add compatibility logic to use metadata indexes in table if indexes in MaterializedIndexMeta is empty and indexes in MaterializedIndexMeta indexId is equal to table baseIndexId.

This PR also fix metadata indexes missing for schema change.
2023-06-19 09:11:36 +08:00
1efd345963 [Enhancement](table) adding information_schema.parameters table (#20259)
this is a virtual table for compatibility information_schema parameters table
2023-06-19 09:05:46 +08:00
8af77315e0 [fix](multi-catalog)fix s3 check, complete catalog properties (#20591)
stability and some fixes

1. fix s3 availability check
2. add independent  minio properties
3. add job conf cache
4. remove extra s3 propertie when convert catalog properties
5. add some ut case to check conveted properties
2023-06-18 20:21:59 +08:00
8366ce7a81 [enhancement](insert-stmt) Make insert into tbl values(); compatible with mysql (#20694) 2023-06-18 19:56:07 +08:00
ac3290021d [fix](Nereids): MergeSetOperations can merge SetOperation ALL. (#20902) 2023-06-18 17:49:03 +08:00
5ae14549d1 [Feature](Nereids) support delete using syntax to delete data from unique key table (#20452) 2023-06-18 16:22:21 +08:00
905ba3fa86 [fix](Nereids & planner) fix 3 plan errors about mv selection (#20939)
fix 3 issues about mv selection:
1. in legacy planner, should not consider aux expr when do mv selection
2. in Nereids, should not hit mv when agg function on value column is distinct
3. select mv cannot rewrite agg function in on table with column name in uppercase
2023-06-18 12:45:34 +08:00
c6d78c2d7b [fix](Nereids) cannot get output when partitioned table without any parititon (#20937) 2023-06-18 12:44:36 +08:00
e5015b472e [Fix](Error) fix some typo error in code (#20612) 2023-06-17 08:34:26 +08:00
fe18cfa2fb [improvement](pg jdbc)Support for automatically obtaining the precision of the postgresql timestamp type (#20909) 2023-06-16 23:41:09 +08:00
367f64e7bd [improvement](jdbc) support insert autoinc and default value column to mysql (#20765)
In JdbcMysqlClient, I've added methods to retrieve auto-increment and default value columns from MySQL. These columns are then mapped into Doris metadata to make them visible to users.

When handling the InsertStmt into an execution plan, Doris used to automatically fill in NULL or default values for columns not specified in the InsertStmt. However, in the JDBC catalog, we don't need Doris to handle these unspecified columns, so I've made changes to skip them directly.

For the insert prepared statement required for writing, our previous behavior was to obtain all columns for placeholders. So, the change I made is to pass in the columns processed by the execution plan during the sink task generation stage for dynamic generation.
2023-06-16 23:38:11 +08:00
e834637a5b [improvement](ck jdbc) Support for automatically getting the precision of clickhouse's datetime64 type (#20887) 2023-06-16 23:37:30 +08:00