Commit Graph

2432 Commits

Author SHA1 Message Date
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
Pxl
461a31b1f6 [enhancement][Storage] refactor create predicate (#11017) 2022-07-27 16:12:23 +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
61fb39a5ca [Enhancement](Nereids) add some basic data structure definitions. (#10981)
add decimal 、date、datetime type
add DateLiteral
add Interval for timestamp calculation
2022-07-26 17:51:59 +08:00
09224d7c74 [refactor] Rename Catalog to Env (#10702) 2022-07-26 15:49:08 +08:00
846716ac10 [feature](nereids): join reorder (#10479)
Enhance join reorder.

Add LAsscom (include with project).
Add Commute.
Add UT for join reorder
2022-07-26 15:35:00 +08:00
a3df2e5982 [enhance](*): improve code about optional (#11153)
improve code about optional
2022-07-26 15:32:42 +08:00
58795771f2 [feature](nereids) Add subquery expression and In expression and TPCH… (#11129)
1. Increase the expression of subquery and in.
2. Added tpch creation table and sql query, including original sql query and query rewritten by doris
3. Adjust the position of checkAnalyze
4. add exists subquery
2022-07-26 12:30:12 +08:00
8fc79e3ee4 rename aggregate properties (#11117)
1. Unify and refine property names in LogicalAggregate and PhysicalAggregate
2. Remove partitionExpressions in LogicalAggregate since it's a physical property, and should not appear in the logical plan. It should be generated when converting logical aggregate to physical aggregate or in enforcing rules.
2022-07-26 12:26:02 +08:00
e54b57107a [bug](FE): Fix show alter column return incorrect job progress (#11184)
bugfix:now show altr table return correct job progress
2022-07-26 11:49:14 +08:00
1788e2fe6c [fix](fe-ut) Ignore invalid datetimev2 partition value in UT (#11178) 2022-07-26 09:00:38 +08:00
a9fc078b55 [RegressionTest][Array] Fix the bug of regression of array test: (#11173)
1. [] do not have a proper array nested type, cause BE coredump
2. [abc] or ['abc'] load by vectorized load get error result

Co-authored-by: lihaopeng <lihaopeng@baidu.com>
2022-07-25 18:13:49 +08:00
c641de4629 [fix](fe-ut) Fix FE UT failures (#11155) 2022-07-25 14:09:20 +08:00
d2457ce8f9 [Feature](Nereids) Add an annotation @Developing (#11077)
Currently, the new optimizer is under development. We want to merge not fully developed features into the code, but not be used in the main code path.

Added an annotation @Developing to mark these features.
2022-07-25 11:24:26 +08:00
d9066440f6 [fix](fe_plugins) update fe plugins' dependency to fe 1.0-SNAPSHOT (#11141) 2022-07-25 09:13:15 +08:00
573ca0bbc2 FIX: odbc string error (#11096) 2022-07-23 18:19:11 +08:00
Pxl
6e98ebba27 [Vectorized] Support sort combinator (#10469) 2022-07-23 17:58:31 +08:00
baef77a8f0 [feature](nereids): add equals for expression (#11067)
add equals for datatype and some expression.

Fix some small problem like arrangement.
2022-07-23 17:32:06 +08:00
babab5d535 [feature-wip] support datetimev2 (#11085) 2022-07-23 16:07:59 +08:00
7c7852994c (fix)(Nereids) fix ssb and add regression test case (#11095)
current nereids planner execute ssb will run into dead loop and crash be, this pr fix this problem and add some regression test case prevent execute ssb failed
2022-07-23 12:41:47 +08:00
fdb4193e1b [Vectorized][Refactor] Refactor the function of tuple_is_null, only do work in hash join node (#11109) 2022-07-23 11:50:07 +08:00
98abb8bc1f fix empty storage policy, be refresh exception log. (#11123)
* fix empty storage policy, be refresh exception log.

* fix log level
2022-07-22 22:10:16 +08:00
aa1bcdbc18 [Bug] Show create table null pointer of storage policy and error htttp path of tablet info (#10950)
Co-authored-by: lihaopeng <lihaopeng@baidu.com>
2022-07-22 20:55:35 +08:00
d17c906eb7 [chore](FE)add license header check in fe's checkstyle (#11076)
Add license header check in fe's checkstyle
2022-07-22 18:37:32 +08:00
34f328aa57 [feature] (Nereids) Merge memo group recursively (#11043)
In Memo.copyIn( plan, group1, isRewrite), one branch is that the plan is already recorded in Memo, and owned by group 'group2'. In such case, 'group1' should be merged with 'group2', because they are equivalent.
After merge, the upper level of 'group1', saying 'p1 = group1.getLogicalExpression().getOwnerGroup()' of 'group1', and that of 'group2', saying 'p2', are equivalent. We need to merge 'p1' and 'p2'. And this process is recursive.
2022-07-22 18:31:32 +08:00
0681e4f04f [Refactor](Nereids) Remove expression type. (#11066)
ExpressionType is duplicated with Java class type info, so removed it.
2022-07-22 17:48:18 +08:00
6963c41a04 [dependency] Upgrade Apache Commons Validator version to the latest one (#10508) 2022-07-22 17:03:46 +08:00