Commit Graph

1356 Commits

Author SHA1 Message Date
1cf57a985d [fix] Fix the query result error caused by the grouping sets statemen… (#11316)
* [fix] Fix the query result error caused by the grouping sets statement grouping as an expression
2022-08-01 13:52:18 +08:00
0325fa436e [fix](agg)Add field of 'is_first_phase' in TAggregationNode (#11321) 2022-08-01 11:49:50 +08:00
34ed40bb71 [Feature](array) doe support array (#11340) 2022-08-01 10:56:40 +08:00
76970200ec [Bugfix](light-schema-change) Fix bf columns message miss when load (#11367) 2022-08-01 10:53:25 +08:00
547c18d28b [feature](load) support CLEAN LABEL stmt (#11362) 2022-08-01 10:43:33 +08:00
3f43d7262b [Bug] (datetimev2) fix bugs for datev2/datetimev2 (#11358) 2022-08-01 10:29:56 +08:00
e20e6624ab [feature](nereids): polish property deriver enforcer job (#11222)
Polish property deriver enforcer job
2022-07-31 17:22:41 +08:00
5999666115 [fix](planner)do not change non-null to nullable for outer join table slot (#11268)
* remove nullable for outer join table

* fix ut

* remove useless comment

* fix for original engine
2022-07-29 21:34:24 +08:00
e7fae413dd [feature](nereids) add scalar subquery expression (#11332)
scalar subquery:
A subquery that will return only one row and one column.

A limit has been added, where a = subquery returns a result of 1 row and 1 column.
Here, the first limit is to return 1 column.

TODO: the subsequent return will limit the return to 1 row
2022-07-29 21:05:19 +08:00
d3c88471ad [tracing] Support opentelemtry collector. (#10864)
* [tracing] Support opentelemtry collector.

1. support for exporting traces to multiple distributed tracing system via collector;
2. support using collector to process traces.
2022-07-29 16:49:40 +08:00
3fe7b21ac8 [Improvement](vectorized) Remove row-based conjuncts on vectorized nodes (#11324) 2022-07-29 15:42:06 +08:00
a6537a90cd [Enhancement] Garbage collection of unused data on remote storage backend (#10731)
* [Feature](cold_on_s3) support unused remote rowset gc

* return aborted when skip drop tablet

* perform unused remote rowset gc
2022-07-29 14:38:39 +08:00
eb4721cd80 [enhance](*): replace with StringBuild (#11146) 2022-07-29 14:31:35 +08:00
642499265c [fe-package]reject illegal import (#11311) 2022-07-29 14:22:23 +08:00
8edbe39de8 [project-node]add projection thrift (#11309) 2022-07-29 14:15:06 +08:00
e40c68e913 [Fix](metric) Fix FE max_instances_num_per_user metric (#11313) 2022-07-29 14:14:05 +08:00
d13406d59e [Bug] (outer join) Fix wrong types in outer join (#11315) 2022-07-29 14:13:09 +08:00
a60cfab844 [feature](Nereids) Add subquery analyze (#11300)
Increase the parsing of subquery.

Add LogicalApply and LogicalCorrelatedJoin and LogicalEnforceSingleRow.
(These structures are temporarily in use, in preparation for the follow-up)

LogicalApply:
Apply Node for subquery.
Use this node to display the subquery in the relational algebra tree.
refer to "Orthogonal Optimization of Subqueries and Aggregation"

LogicalCorrelatedJoin:
A relational algebra node with join type converted from apply node to subquery.

LogicalEnforceSingleRow:
Guaranteed to return a result of 1 row.
2022-07-29 12:44:04 +08:00
3c44d84c93 [refactor] (datetimev2) refactor FEFunctions for datev2/datetimev2 (#11296) 2022-07-29 10:22:25 +08:00
bac280e803 [Vectorized] Support both distinct and order by of group_concat (#11278)
Co-authored-by: lihaopeng <lihaopeng@baidu.com>
2022-07-29 09:11:34 +08:00
951320256b [enhancement](Nereids)enable explain query for nereids planner (#11210)
Support explain syntax. And generate explain tree string by nereids' planner.
2022-07-28 17:23:17 +08:00
70c7e3d7aa [feature-wip](unique-key-merge-on-write) remove AggType on unique table with MoW, enable preAggreation, DSIP-018[5/2] (#11205)
remove AggType on unique table with MoW, enable preAggreation
2022-07-28 17:03:05 +08:00
97874dd125 [improvement](profile) add json profile and add session context (#11279)
1. Add a new session varible "session_context"
2. support export profile in json format
2022-07-28 15:48:00 +08:00
75451ab0ed [feature](nereids) Add stats derive framework for new optimizer (#11179)
Implement a visitor to derive stats for each operator which would be used for CBO.
2022-07-28 14:38:19 +08:00
328a225050 [feature-wip] (datetimev2) support window funnel and modify valid dat… (#11277)
* [feature-wip] (datetimev2) support window funnel and modify valid date range
2022-07-28 14:06:26 +08:00
0b1d06bfd6 [Vectorized] Support order by aggregate function (#11187)
Co-authored-by: lihaopeng <lihaopeng@baidu.com>
2022-07-28 09:12:58 +08:00
fccc5e3097 [improvement](log) Avoid too many 'not found query' warn log (#11048) 2022-07-28 09:12:25 +08:00
72d2feae99 [feature-wip] Support all date functions for datev2/datetimev2 (#11265)
* [feature-wip] (datetimev2) support convert_tz function

* [feature-wip] Support all date functions for datev2/datetimev2
2022-07-28 08:18:59 +08:00
87b1f4c071 [feature](multi-catalog) Support es datasource (#10565) 2022-07-27 23:16:17 +08:00
8128e5d4f0 [feature-wip](multi-catalog) support pruning buckets for hive bucket table (#11156)
1. Spark currently does not populate bucketed output which is compatible with Hive, so spark bucket table is not supported in current implementation.
2. Hive 3.0 introduced bucket version 2, but doris still uses hive 2.3.7 which lacks the hash function of version 2, so I refer to the implementation of Trino and copy the hash function from hive.
3. Current implementation doest not support the table with multiple bucketed columns, and only support `Equal` and `In` predicates.
2022-07-27 23:16:00 +08:00
a2f39278e2 [feature](Nereids): add MultiJoin. (#11254)
Add MultiJoin.

In addtion, when (joinInputs.size() >= 3 && !conjuncts.isEmpty()), conjunct still can contains onPredicate.

Like:
```
A join B on A.id = B.id where A.sid = B.sid
```
2022-07-27 19:26:02 +08:00
5913c7c52c [feature-wip](array-type) add function array_slice (#11054)
array_slice function returns a slice of the array.
2022-07-27 18:43:52 +08:00
42d76b54dc [fix](compile)fix compile failed after merge #11117 #10479 and #11162 (#11253)
fix the compile failed after merge #11117 #10479 and #11162
2022-07-27 17:25:06 +08:00
be2ac6aa59 [fix](auth) Forbid grant USAGE_PRIV to database.table (#11234) 2022-07-27 16:51:15 +08:00
daf2e27202 [feature] (Nereids) add rule to push down predicate through aggregate (#11162)
add rule to push predicates down to aggregation node

add PushDownPredicatesThroughAggregation.java
add ut for PushDownPredicatesThroughAggregation
For example:

```
  Logical plan tree:
                  any_node
                    |
                 filter (a>0 and b>0)
                    |
                 group by(a, c)
                    |
                  scan
```
transformed to:
```
                  project
                    |
               upper filter (b>0)
                    |
                 group by(a, c)
                    |
               bottom filter (a>0)
                    |
                  scan
```

Note:
'a>0' could be push down, because 'a' is in group by keys;
but 'b>0' could not push down, because 'b' is not in group by keys.
2022-07-27 15:16:15 +08:00
d9fab77100 [fix](planner)LateralViewRef#toSql throw NPE if it is not analyzed (#11221) 2022-07-27 14:44:27 +08:00
9fc5ec48b4 [Improvement] remove UT for unused method (#11241)
* [Improvement] remove UT for unused method
2022-07-27 13:55:36 +08:00
0cdd70e9c9 [feature](nereids) support cast and extract date for TPC-H (#10999)
support cast and extract date for TPC-H, for example:

select cast(a as datetime) as d from test;
select extract(year from datetime_column) as y from test
2022-07-27 12:38:56 +08:00
4f3b4c7efc [Improvement] information_schema.columns support COLUMN KEY (#11228) 2022-07-27 12:22:17 +08:00
05b840fcb9 [improvement] support show query stmt in show processlist (#11232) 2022-07-27 11:40:47 +08:00
d663497230 [refactor] (Nereids) Memo.copyIn() return a pair<newly, GroupExpression> (#10891)
When we copy a plan into memo, we will check if this plan is already in memo or it is a new plan.
In the new version of Memo.copyIn(), we encapsulate is_new and the plan's corresponding group-expression.

The is_new is used to avoid repeatedly apply rules against the same plan, and hence save optimize efforts.

Describe the overview of changes.

change Memo.copyIn() and related function interfaces
every time Memo.copyIn() is invoked, we check if the plan is already recorded by memo or not. if plan is not new, we do not put its group into stack for further optimization.
2022-07-27 10:33:25 +08:00
c6b0df5cbe [fix](ut) fix FE ut (#11215) 2022-07-27 08:18:31 +08:00
d67029c830 [feature-wip] (datetimev2) support cast between datetimev2 with different scales (#11198)
* [feature-wip] (datetimev2) support `cast` between datetimev2 with different scale
2022-07-26 22:36:13 +08:00
166b4a18ae [fix](image) fix bug that latestValidatedImageSeq may not be the second largest image id (#11201)
* [fix](image) fix bug that latestValidatedImageSeq may not be the second largest image id

When traversing the image files in the meta directory,
it cannot be guaranteed to be traversed in the order of imageid size

For example, if it traverses the image file with orders like: 3,5,4,1,
then latestImageSeq is 5, but latestValidatedImageSeq is 3, which is wrong.
2022-07-26 22:35:31 +08:00
8a6c9d870e [enhancement](nereids) Fix the wrong order of arguments of Assert.assertEquals (#11207) 2022-07-26 20:33:32 +08:00
2e210fb363 [bugfix]fix constant argument coredump (#11200) 2022-07-26 19:30:06 +08:00
fcdb543e17 [refactor] (Nereids) add equals for OrderKey (#11192)
LogicalSort.equals() method depends on OrderKey.equals(), which is not defined correctly.
This pr defines OrderKey.equals() to enable correctly comparing LogicalSort.
2022-07-26 18:55:27 +08:00
e99f617b21 [Refactor](Nereids) Move analysis logic to dedicated class NereidsAnalyzer. (#11171)
This PR proposes to move the analysis logic to the dedicated class NereidsAnalyzer, which has the following benefits:

Unify the analysis logic in production and test files.
Facilitate analyzing subquery plans within different scopes.
2022-07-26 18:32:07 +08:00
a1ad978960 [Bug]Fix select command denied for user for specified table 2022-07-26 17:59:28 +08:00
0f6ec629ab [Bug](fe-ut) Fix UT when test cases in package (#11177) 2022-07-26 17:57:42 +08:00