Commit Graph

4893 Commits

Author SHA1 Message Date
2a442972a8 [Fix](merge-on-write) Fix some bugs about sequence column (#24915)
1. add checks and handling of sequence column in #21896 to insert statement in origin planner and Nereids planner.
2. disable drop sequence mapping column in schema change.
2023-10-18 20:40:12 +08:00
2ddd2e5079 [feature](Nereids) add map_agg function (#25246) 2023-10-18 06:44:36 -05:00
9e07291e65 [fix](stats) internal stats table tablet replica num not update as expected (#25563)
Before this PR, scale would not happen, since in the previous implementation relica count of all tablets was considered
2023-10-18 06:42:41 -05:00
ea97f2d6e5 [refactor](nereids)make enable_stats session var (#25550)
this pr is used to test plan shape without column stats
2023-10-18 18:13:15 +08:00
85e83b9c6c [fix](auth)fix not check udf auth in nereids (#25541) 2023-10-18 16:22:36 +08:00
62d06584f1 [feature](fe) add function 'BitmapAgg' in nereids (#25508) 2023-10-18 14:24:27 +08:00
8a8e6edba9 [enhancement](stats) Unify sample algorithm between olap table and external table (#25472)
To reduce error of ndv estimation of olap table's column
2023-10-18 01:18:40 -05:00
0ec537edef [fix](column-id) fix null conn ctx in column id flusher and parser for database field in corresponding show stmt (#25393) 2023-10-18 14:11:31 +08:00
db16a14970 [fix](backup) fix backup fail on s3 (#25496)
The s3 client properties are not passed to BE correctly.
The test cases will be added later
2023-10-18 13:52:12 +08:00
d2400d1d7b [feature](profile) profilev2 distinguish Sink and Operator in pipelineX (#25491)
* update

* update
2023-10-18 13:12:29 +08:00
ef9cbc4c64 [enhancement](priv) Clarify ccr releated FrontendServiceImpl call privs (#25530)
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
2023-10-18 10:51:55 +08:00
6f6264693f [fix](Nereids) can't choosing best plan for join that could only broadcast (#25511)
we need ensure there is one request properties at least
2023-10-17 21:40:05 -05:00
b0e0a0569a [Fix](row store) Real default value should be used instead of default… (#25230)
Before this PR the default value is not correct, we should use default value in Frontend schema.
2023-10-18 10:13:44 +08:00
26e332c608 [fix](multi-catalog)add exception for unsupported hive input format (#25490)
add exception for unsupported hive input format
2023-10-17 22:53:53 +08:00
b76e23fb34 [improvement](meta) allow to ignore unknown image module (#25450)
Add new FE config `ignore_unknown_metadata_module`. Default is false.
If set to true, when reading metadata image file, and there are unknown modules, these modules
will be ignored and skipped.
This is mainly used in downgrade operation, old version can be compatible with new version Image file.
2023-10-17 22:53:31 +08:00
18c2a13e09 [fix](multi-catalog)fix maxcompute partition filter and session creation (#24911)
add maxcompute partition support
fix maxcompute partition filter
modify maxcompute session create method
2023-10-17 22:36:10 +08:00
d287f53d77 [fix](nereids)in physical plan, print join class simple name not full name #25515 2023-10-17 20:25:14 +08:00
9b1cdd3230 [fix](planner) mark join slot should always be nullable (#25433) 2023-10-17 06:14:13 -05:00
8eff1486bd [feature](nereids)print query id with memo and physical tree (#25501)
print query id with memo and physical tree when dump_nereids_memo switched on. This is used for regression test.
2023-10-17 05:06:11 -05:00
9d6b2dceb2 [fix](Nereids) non-slot filter should not be push through aggregate (#25525) 2023-10-17 05:02:26 -05:00
af8832389f [feature](Nereids) add 4 array functions (#25488)
- array_concat
- array_pushback
- array_pushfront
- array_zip
2023-10-17 04:45:15 -05:00
f38f5f50eb [fix](ipv6)fix can not resolve host and port (#25254)
for ipv6,address should be [ip]:port instead of ip:port
2023-10-17 15:46:45 +08:00
652d6c57c0 [fix](jdbc catalog) fix handle oracle date format (#25487) 2023-10-17 02:10:28 -05:00
4d12d8885e [feature](Nereids): graphSimplifier should compare edge1BeforeEdge2 and edge2BeforeEdge1 (#25416) 2023-10-17 14:10:21 +08:00
0ee06f30b0 [feature](nereids)Ignore some node in 'explain shape plan' command (#25485)
if set ignore_shape_nodes='PhysicalDistribute, PhysicalProject'
then
explain shape plan will not print project and distribute node
2023-10-17 11:57:36 +08:00
410441b516 [enhancement](Nereids): remove LAsscom in Bushy Tree RuleSet (#25465)
- Bushy Tree RuleSet don't need LAsscom
- fix bug: rule pattern shouldn't use same name
2023-10-17 11:22:52 +08:00
384fddb2ff [test](case)add some debug log in mv case (#25458)
* [test](case)change the insert stmt in mv case
2023-10-17 11:04:45 +08:00
1130317b91 [Improvement](statistics)Collect stats for hive partition column using metadata (#24853)
Hive partition columns' stats could be calculated from hive metastore data. Doesn't need to execute sql to get the stats.
This PR is using hive partition metadata to collect partition column stats.
2023-10-17 10:31:57 +08:00
85b8497624 [fix](Tvf) return empty set when tvf queries an empty file or an error uri (#25280)
### Before:
return errors when tvf queries an empty file or an error uri:
1. get parsed schema failed, empty csv file
2. Can not get first file, please check uri.

### Now:
we just return empty set when tvf queries an empty file or an error uri.
```sql
mysql> select * from s3( 
"uri" = "https://error_uri/exp_1.csv", 
"s3.access_key"= "xx", 
"s3.secret_key" = "yy", 
"format" = "csv") limit 10;

Empty set (1.29 sec)
```
2023-10-17 09:52:53 +08:00
a194a15442 [improvement](tablet schedule) colocate balance between all groups (#23543) 2023-10-17 09:33:52 +08:00
f9a80ecdab [improvement](sync version) fe sync version with be (#25236) 2023-10-16 20:34:25 +08:00
Pxl
72920fbd1d [Improvement](materialized-view) set job failed when toAgentTaskRequest meet error (#25358)
set job failed when toAgentTaskRequest meet error
2023-10-16 20:10:52 +08:00
f9df3bae61 [Enhancement](functions) change some nullable mode and clear some smooth upgrade (#25334) 2023-10-16 19:50:17 +08:00
7fd876f3a2 [fix](planner)should call SlotRef'smaterializeSrcExpr() method if the slotRef is materialized (#25467) 2023-10-16 19:42:12 +08:00
e3d0e55794 [feature-wip] (Nereids) Support transforming trino dialect SQL to logical plan (#21855)
Support transforming trino dialect SQL to logical plan (#21854)

## Proposed changes

Issue Number: #21854 
Use io.trino.sql.tree.AstVisitor as vistor, visit coorresponding trino node and transform it to doris logical plan.

## Further comments

Here are some examples for function transforming as following:
**ascii('a')** function is in doris and **codepoint('a')** funtion in trino, they have the same feature and have the same method signature, so we can use [TrinoFnCallTransformer](3b37b76886/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/trino/TrinoFnCallTransformer.java) to handle them.

another example for ComplexTransformer as following:
**date_diff('second', TIMESTAMP '2020-12-25 22:00:00', TIMESTAMP '2020-12-25 21:00:00')"** fuction in trino
and **seconds_diff(2020-12-25 22:00:00, 2020-12-25 21:00:00)")** fuction in doris. They have different method signature, we cant not handle it by TrinoFnCallTransformer simply and we should handle it by individual complex transformer [DateDiffFnCallTransformer](3b37b76886/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/trino/DateDiffFnCallTransformer.java).
2023-10-16 05:10:55 -05:00
cf073ec8ce [runtimefilter](nerieds)support Non equal runtime filter for nested loop join #25193 2023-10-16 17:49:47 +08:00
Pxl
d41e839ea0 [Chore](sink) add index number check for table sink (#25461)
add index number check for table sink
2023-10-16 17:03:26 +08:00
9deda929b9 [refactor](stats) Use id instead name in analysis info (#25213) 2023-10-16 03:49:53 -05:00
b2e3ecb81d [opt](load)change load_to_single_tablet tablet search algorithm from random to round-robin (#25256)
At present, `load_to_singlt_tablet` import implementation refers to simple random number remainder, which cannot achieve true averaging. This will lead to uneven disk IO and uneven use of cluster resources. To solve this problem, we are preparing to implement round-robin for each partition tablet imported each time, in order to achieve average load to each tablet.

When generating the load query plan, the tablet index record currently imported is passed to BE.
Add a deamon task in FE to regularly clean up the `loadTabletRecordMap`. The map will get the bucket_number of the partition and update the `load_tablet_index` when `getCurrentLoadTabletIndex`.
2023-10-16 16:43:25 +08:00
e8431e1a97 [fix](planner)should not add TupleIsNullPredicate for inlineview plan (#25338) 2023-10-16 15:24:13 +08:00
8e9e1b1bfd [fix](planner) Disable infer expr column name when query on old optimizer (#25317)
Disable infer expr column name when query on old optimizer.
This bug is be brought in #24990

if your query SQL is
select id, name, sum(target) FROM db_test.table_test2 group by id, name;
the result column name when query is as following:
|id|name |sum(cast(target as DOUBLE))|

when you create view as following:
CREATE VIEW v1 as select id, name, sum(target) FROM db_test.table_test2 group by id, name;
then query the view v1, the result is as following:
|id|name |__sum_2|
2023-10-16 02:08:52 -05:00
1a27ac8d56 [opt] use correct column label when execute query in FE (#25372)
SET @a = '4';
SELECT @a;

previous:
+-----+
| '4' |
+-----+
| 4   |
+-----+

current:
+----+
| @a |
+----+
| 4  |
+----+
2023-10-16 02:03:33 -05:00
f698f205d5 [Fix](merge-on-write) throw exception when the user don't specify the insert columns in insert statement for partial update (#25437) 2023-10-16 14:05:06 +08:00
29d4e8ee90 [Fix](Nereids) fix test leading change disable join reorder parameter (#23657)
Problem:
when running pipeline, we get randomly failed of test_leading
Reason:
physical distribute was generated and choosed to be the best plan because we can not get any statistic information of empty table. So we would get some unexpect result because we can not expect the order in memo
Solved:
Add statistic of columns used in test_leading, try repeatly in pipeline
2023-10-15 22:59:45 -05:00
934d82816c [fix](Nereids) add int type alias 'integer' (#25376) 2023-10-15 22:12:44 -05:00
4c57c31c5c [fix](Nereids) count should not accept complex and json type (#25354) 2023-10-15 22:08:35 -05:00
dfc7d04626 [fix](functions) add quantile_state_empty function signature (#25306) 2023-10-16 11:05:48 +08:00
471cf2c48b [improvement](auth) support show view priv (#25370)
Issue Number: close #xxx

current ,if user has select_priv or load_priv,he can show create table view_name,
but this is not safe,so add show_view_priv for show create table view_name

mysql SHOW VIEW description: https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_show-view
2023-10-14 22:37:51 +08:00
03316e2355 [fix](fe rest api)api gets execution plan, table name case problem (#25112)
The user has configured the parameter lower_case_table_names, which ignores the case of the table name. When executed on the SQL client, the table name can be queried in both case.
But when using Connector to read doris data, the table names must be in the same case, otherwise an error will be reported.
2023-10-14 19:48:24 +08:00
e5ef0aa6d4 [refactor](mysql result format) use new serde framework to tuple convert (#25006) 2023-10-14 19:46:42 +08:00