Commit Graph

9076 Commits

Author SHA1 Message Date
9f7386243f [Fix](regression-test)fix some unfixed-answer test #17408 2023-03-04 12:13:41 +08:00
9aecd517b0 [test](Nereids) turn on all test in scalar function w (#17269)
turn on all test case in scalar function W except width_bucket(fix be bug in next PR)
turn off all test case for group_concat(distinct order by)
fix return nullable in TimestampArithmetic
2023-03-04 08:23:50 +08:00
c9179bd155 [chore](workflow) Fix the workflow BE UT (macOS) (#17403)
#17292 enabled detect_container_overflow which made the workflow BE UT (macOS) fail.
2023-03-03 23:34:54 +08:00
b501a9e7ab [improvement](inverted index)use reference to avoid bitmap copy for performance (#17352)
Query runtime is reduced from 10s to 1s for a MATCH query that match 40 million rows out of 44 million rows.
2023-03-03 21:00:49 +08:00
eea0cbec74 [enhancement](transaction) Reduce hold writeLock time for DatabaseTransactionMgr to improve stability of stream load (#17380)
Clear transaction state log occupies too much time, so we change clear transaction log level from info to debug


Co-authored-by: caiconghui1 <caiconghui1@jd.com>
2023-03-03 19:06:39 +08:00
5c265d8183 [fix](vec)crashing caused by parallel output file (#17384) 2023-03-03 19:03:53 +08:00
9f97cd029f [Feature] (Nereids) add check to disable unsupported type (#17196)
1. disable decimalv3
2. disable json
3. disable complex type: array, map, struct
4. disable switch: group_by_and_having_use_alias
2023-03-03 17:57:48 +08:00
17164cf7a8 [fix](docs) add logic for batch delete when sequence column exists (#17367)
* [fix](docs) add logic for batch delete when sequence column exists.

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

* add docs

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

* fix docs 2

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

---------

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-03 16:28:31 +08:00
0fada66e03 [fix](cooldown) Fix deadlock in tablet clone (#17252) 2023-03-03 15:53:12 +08:00
b5b595519a [fix](log) use logger to replace printStackTrace() (#17382)
Use Logger to replace printStackTrace to better locate problems.
2023-03-03 14:51:30 +08:00
cc5fa509ad [fix](cooldown) Fix bug in concurrent update_cooldown_conf and operations that update cooldowned data (#17086) 2023-03-03 14:36:58 +08:00
Pxl
ae689c3a0b [Bug](regression-test) remove some exception title on regression case (#17374)
remove some exception title on regression case
2023-03-03 14:18:10 +08:00
3b94ca5ceb [chore](macOS) Use LLVM Clang by default (#17292)
Use LLVM Clang by default
2023-03-03 14:18:02 +08:00
6ce8200d9e [doc](typo) external-table-load.md (#17234)
* fix: external-table-load.md

The SQL with a syntax error.

* fix: external-table-load.md (Chinese)

The SQL with a syntax error.
2023-03-03 14:11:19 +08:00
11994b76d7 add the tag <version since="dev"> for insert_timeout. (#17316)
Co-authored-by: smallhibiscus <844981280>
2023-03-03 14:10:49 +08:00
ba108d40d8 [docs](link) Fix some links in docs is broken (#17335)
* [docs](link) Fix some links in docs is broken

* fix_typo
2023-03-03 14:08:05 +08:00
f5d958ccf9 [fix](MTMV) Reset insert timeout in handleInsert (#17249)
In #16343, we split the timeout variable into two ones (one is for query and another is for insertion).

The function `ConnectProcessor::handleQuery` uses the corresponding session variable to change the timeout for the queries requested by MySQL client. However, the function `StmtExecutor::handleInsert` doesn't use the session variable to change the timeout, so we can't change the timeout for the CTAS and MTMV insertion job.
2023-03-03 11:32:50 +08:00
c96571c236 [Bug](decimalv2) decimal value is filtered by mistake (#17353)
Reason: column_name[k5], decimal value is not valid for definition, value=123.123, precision=9, scale=3, min=-999999.999, max=-999999.999; . src line [];

#17273
2023-03-03 10:40:19 +08:00
e82b827bc8 [optimize](vectorization)Optimize to_string's performance. (#17076) 2023-03-03 10:35:59 +08:00
94e9a226a6 [Bug](Block compression) Fix bug if config::compress_rowbatches=false then the block column values could be empty (#17325) 2023-03-03 10:31:12 +08:00
f5232e5c01 [vectorized](bug) fix some open enable_fold_constant_by_be failed cases (#17240) 2023-03-03 10:30:20 +08:00
449f2953c9 [Improvement](auth)(step-1) add ranger authorizer for hms catalog (#17153) 2023-03-03 09:45:08 +08:00
227d2b0bf9 [log](schema change) add schema change type log (#17349) 2023-03-03 08:25:28 +08:00
cd7e03575b [tools](tpc-ds) add script tools to run tpc-ds conveniently (#17366)
build-tpcds-tools.sh
gen-tpcds-data.sh
gen-tpcds-queries.sh
create-tpcds-tables.sh
load-tpcds-data.sh
run-tpcds-queries.sh
generate data and queries support specify SCALE,
create table may need to be edited handly to specify BUCKETS or change int to bigint if SCALE is too big.

---------

Co-authored-by: stephen <hello_stephen@@qq.com>
2023-03-03 08:24:07 +08:00
ba82cd10c6 [Enhencement](Jdbc catalog) Add two optional properties for jdbc catalog (#17245)
1. The first property is `only_specified_database`:
In the past, `Jdbc Catalog` will synchronize all database from source database.
Now we add a parameter called `only_specified_database` to jdbc catalog to allow only the specified database to be synchronized, eg:

```sql
create resource if not exists ${resource_name} properties(
    "type"="jdbc",
    "user"="root",
    "password"="123456",
    "jdbc_url" = "jdbc:mysql://172.18.0.1:${mysql_port}/doris_test?useSSL=false",
    "driver_url" = "https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/jdbc_driver/mysql-connector-java-8.0.25.jar",
    "driver_class" = "com.mysql.cj.jdbc.Driver",
    "only_specified_database" = "true"
);
```
if `only_specified_database` is `true`, jdbc catalog will only synchronize the database which is specified in `jdbc_url`.

2. The second property is `lower_case_table_names`:
This property will synchronize jdbc external data source table names in lower case.

```sql
create resource if not exists ${resource_name} properties(
  "type"="jdbc",
  "user"="doris_test",
  "password"="123456",
  "jdbc_url" = "jdbc:oracle:thin:@172.18.0.1:${oracle_port}:${SID}",
  "driver_url" = "https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/jdbc_driver/ojdbc8.jar",
  "driver_class" = "oracle.jdbc.driver.OracleDriver",
  "lower_case_table_names" = "true"
);
```
2023-03-03 00:47:46 +08:00
22983fc813 [fix](test) regression test file has been removed (#17332)
Data file in https://github.com/apache/doris/pull/16342/files has been removed for path conflict,
so change the resource path.
2023-03-03 00:44:48 +08:00
3eeeff09fd [enhancement](nereids) convert string literal to commontype in in-expr and cass-when-expr (#17200) 2023-03-02 22:05:35 +08:00
93d2d461b4 [feature](Nereids): pushdown complex project through left semi/anti Join. (#17186) 2023-03-02 21:41:08 +08:00
a1399043fe [fix](Nereids) fold constant on BE could not process alias (#17259)
1. could not use static INSTANCE for FoldConstantOnBE rule, because it is stateful
2. if expression root is Alias, should use its child to do const collection
2023-03-02 19:16:23 +08:00
27352afdf6 [fix](fe)support multi distinct group_concat (#17237)
* [fix](fe)support multi distinct group_concat

* update based on comments
2023-03-02 17:53:13 +08:00
33349e1457 [fix](Nereids) fold 'version()' function (#17172)
For compatibility with legacy planner, we fold version() with GlobalVariable.version in Nereids
2023-03-02 17:35:41 +08:00
823d968452 [fix](expr) avoid crashing caused by big depth of expression tree (#17314) 2023-03-02 16:55:53 +08:00
39f59f554a [improvement](dry-run)(tvf) support csv schema in tvf and add "dry_run_query" variable (#16983)
This CL mainly changes:

Support specifying csv schema manually in s3/hdfs table valued function

s3 (
'URI' = 'https://bucket1/inventory.dat',
'ACCESS_KEY'= 'ak',
'SECRET_KEY' = 'sk',
'FORMAT' = 'csv',
'column_separator' = '|',
'csv_schema' = 'k1:int;k2:int;k3:int;k4:decimal(38,10)',
'use_path_style'='true'
)
Add new session variable dry_run_query

If set to true, the real query result will not be returned, instead, it will only return the number of returned rows.

mysql> select * from bigtable;
+--------------+
| ReturnedRows |
+--------------+
| 10000000     |
+--------------+
This can avoid large result set transmission time and focus on real execution time of query engine.
For debug and analysis purpose.
2023-03-02 16:51:27 +08:00
17f4990bd3 [enhancement](functioncontext) function context should use shared ptr and simply function context (#17311)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2023-03-02 16:23:54 +08:00
698e9cd243 [fix](demo)fix cdc failed to synchronize datetime type in mysql, and added JsonDebeziumSchemaSerializer (#16971)
* [fix](demo)fix cdc failed to synchronize datetime type in mysql, and added JsonDebeziumSchemaSerializer
* add licenses for DateToStringConverter
2023-03-02 14:14:58 +08:00
9f088f6e90 [feature](json) add json_valid function (#17247)
add json_valid function

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-02 14:08:52 +08:00
9155d8b9d1 [fix](delete) fix 'is null' or 'is not null' delete predicate will get wrong result (#17190)
fix 'is null' or 'is not null' delete predicate will get wrong result

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-02 14:05:44 +08:00
707f814fc2 [fix](inverted index) fix still execute match query after drop inverted index (#17293)
background:
At the moment, match query must with inverted index,

problem description:
After drop inverted index which is the only index in table, there still can use match query for this index column.

fix it:
The index should be updated on BE regardless of whether the indexes_desc from FE is empty.
2023-03-02 11:12:54 +08:00
30df268c1f [fix](hdfs)(catalog) fix BE crash when hdfs-site.xml not exist in be/conf and fix compute node logic (#17244)
We set LIBHDFS3_CONF env in start_be.sh, so libhdfs3 will try to read this hdfs-site.xml,
if file does not exist, it will throw error. But Doris does not handle this error, cause BE crash.
This CL mainly changes:

Modify start_be.sh to only set LIBHDFS3_CONF if hdfs-site.xml exist.
Refactor the HDFSCommonBuilder so that it can return error correctly.
Add BE IP info in status, so that we can get ip from error msg like:
ERROR 1105 (HY000): errCode = 2, detailMessage = [INTERNAL_ERROR]failed to init reader for file  000.snappy.orc, err: 
[INTERNAL_ERROR][172.21.0.101]failed to init HDFSCommonBuilder, please check check be/conf/hdfs-site.xml
The logic of prefer compute node is wrong, which causing the external table query can only assign up to 3 backends.
This CL refactor this logic and also change some FE config:

prefer_compute_node_for_external_table

If set to true, query on external table will prefer to assign to compute node.
And the max number of compute node is controlled by min_backend_num_for_external_table.
If set to false, query on external table will assign to any node.

min_backend_num_for_external_table

Only take effect when prefer_compute_node_for_external_table is true.
If the compute node number is less than this value, query on external table will try to get some mix node
to assign, to let the total number of node reach this value.
If the compute node number is larger than this value, query on external table will assign to compute node only.
2023-03-02 11:09:55 +08:00
4682b4564c [enhance](Nereids): delete output in olapscan toString() (#17288) 2023-03-02 10:53:24 +08:00
a5ae3072e5 [fix](planner) ignore aux expr when do push agg op (#17239) 2023-03-02 10:44:40 +08:00
de5112bd90 [bugfix](merger) traverse rs_meta in lock (#17271)
tablet_schema(version) will traverse rowset_meta and it should call in meta_lock.
2023-03-02 09:47:44 +08:00
b7677beab7 [enhancement](memtracker) Add special counter for memtracker and fix thread create and destroy track #17301
Add a special counter for memtracker, faster, but relaxed ordering and not accurate in real time
Track thread create and destroy memory, which was previously removed due to performance loss and added back
2023-03-02 08:55:00 +08:00
d7ee542dd4 [refactor](function) refine function geo #17289
remove unused constant args
2023-03-02 08:42:16 +08:00
201cf9c8df Revert "[enhancement](k8s) Support fqdn mode for fe in k8s enviroment (#16315)" (#17278)
This reverts commit 48afd77e37d63e2989cd85ab12b39a273fcd284e.
There is meta problem
2023-03-02 00:44:54 +08:00
Pxl
527eb5b059 [Enchancement](function) nullable inline refactor of min_max_by/bitmap && add register_functio… (#17228)
1. nullable inline refactor of min_max_by/bitmap/group_concat/histogram/topn
2. add register_function_both method
3. add datetimev2 type creator of min_max_by
4. remove uint16/32/64 in FOR_INTEGER_TYPES
2023-03-02 00:00:01 +08:00
bb88f2ec7d [fix](multi-catalog) fix not find dbname from internal catalog (#17119)
Signed-off-by: nextdreamblue <zxw520blue1@163.com>
fix not find dbname from internal catalog
2023-03-01 23:59:12 +08:00
5523859fd5 [typo](readme)Fix typo in README 2023-03-01 23:43:27 +08:00
b0c5250bf9 [Enhancement](tvf) support trim_double_quotes and skip_lines for S3 and HDFS table valued function (#17224)
support trim_double_quotes and skip_lines for S3 and HDFS table valued function
2023-03-01 23:41:31 +08:00
1244eed1cd [Opt](exec) opt the dispose nullable column logic (#17192) 2023-03-01 23:25:40 +08:00