Commit Graph

8289 Commits

Author SHA1 Message Date
3d1206d325 [date](fix) modify push-down predicate for datev1 type (#25571)
For comparison predicate, two arguments must be cast to datetime and push down to storage if either one is date type. This PR disables predicate push-down for this case.
2023-10-19 14:18:27 +08:00
ed713c2e2d [FIX](func) fix count distinct do not support arr/map/struct (#25483) 2023-10-19 01:04:50 -05:00
b45f501e51 [improvement](nereids) Support aggregate functions without from clause (#25500)
Support aggregate functions in select without from clause, here are some examples as following:

SELECT 1,  
  'a',
   COUNT(),  
   SUM(1) + 1,
   AVG(2) / COUNT(),
   MAX(3),
   MIN(4),
   RANK() OVER() AS w_rank,
   DENSE_RANK() OVER() AS w_dense_rank,
   ROW_NUMBER() OVER() AS w_row_number,
   SUM(5) OVER() AS w_sum,
   AVG(6) OVER() AS w_avg,
   COUNT() OVER() AS w_count,
   MAX(7) OVER() AS w_max,
   MIN(8) OVER() AS w_min;
2023-10-18 23:07:37 -05:00
8d65a62705 [Fix](show-frontends-disk)Fix NPE and macOS compatibility (#25565) 2023-10-19 09:53:43 +08:00
45178f5664 [improvement](disk balance) impr disk rebalancer sched with partition rebalancer (#25549) 2023-10-19 09:33:42 +08:00
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
47689fd452 [refactor](jni) unified jni framework for java udf (#25302)
Use the unified jni framework to refactor java udf.
The unified jni framework takes VectorTable as the container to transform data between c++ and java, and hide the details of data format conversion.
In addition, the unified framework supports complex and nested types.
The performance of basic types remains consistent, with a 30% improvement in string types and an order of magnitude improvement in complex types.
2023-10-18 09:27:54 +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
ce18f1148a [improvement](catalog)compatible with paimon 0.5 (#24985)
compatible with paimon 0.5
add p0 for paimon,need set enablePaimonTest=true
2023-10-17 22:07:13 +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
f1a5e393c7 [feature](insert) Support group commit insert use new syntax like insert into table_id(xxx) (#25484) 2023-10-17 09:23:09 +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
4c42f3b783 [Improvement](hive-udf)(doc) minimize hive-udf and add some docs. (#24786) 2023-10-16 16:47:21 +08: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
b83e412623 [fix](hive-udf) delete Logger to avoid Kryo serialize problem. (#25312) 2023-10-16 16:10:06 +08:00
e8431e1a97 [fix](planner)should not add TupleIsNullPredicate for inlineview plan (#25338) 2023-10-16 15:24:13 +08:00