Commit Graph

2260 Commits

Author SHA1 Message Date
abd10f0f3e [feature-wip](multi-catalog) Impl FileScanNode in be (#10402)
Define a new file scanner node for hms table in be.
This file scanner node is different from broker scan node as blow:
1. Broker scan node will define src slot and dest slot, there is two memory copy in it: first is from file to src slot
    and second from src to dest slot. Otherwise FileScanNode only have one stemp memory copy just from file to dest slot.
2. Broker scan node will read all the filed in the file to src slot and FileScanNode only read the need filed.
3. Broker scan node will convert type into string type for src slot and then use cast to convert to dest slot type,
    but FileScanNode will have the final type.

Now FileScanNode is a standalone code, but we will uniform the file scan and broker scan in the feature.
2022-06-29 11:04:01 +08:00
9aa800141d [fix](ut)(nereids) the check bound function lacks recursive processing (#10357) 2022-06-29 10:40:13 +08:00
0a36c34326 [feature](nereids) costAndEnforcerJob interim solution (#10468)
In order to complete the ssb test, temporarily increase the implementation of costAndEnforcerJob, and create an OptimizeGroupjob for all children of the group.
2022-06-28 18:45:23 +08:00
f5936aa7ce [enhancement](Nereids): add more implmentation rules. (#10335)
Add more implmentation rules.

Current some `logical` and `physical` operator is different. I change some code to make them match.

Implementation
- Sort:only heap sort
- Agg
- OlapScan
2022-06-28 17:08:33 +08:00
17eb8c00d3 [feature] add table valued function framework and numbers table valued function (#10214) 2022-06-28 14:01:57 +08:00
1f2bf39140 [feature-wip](multi-catalog) get catalog name from TableName (#10435) 2022-06-28 10:42:37 +08:00
498a80547c [fix](fe-ut) fix fe ut and build.sh bug (#10432) 2022-06-27 19:01:05 +08:00
ca94867b4e [Feature-wip] add date v2 type (#9916) 2022-06-26 16:07:56 +08:00
HB
f6ef1aad5c [fix](backup) fix mkdir failed (#10422) (#10423) 2022-06-26 09:55:48 +08:00
4408231765 [fix](random-distribution) Make aggregate keys table with replace type columns and unique keys table can only have hash distribution to make data computing correctly (#10414) 2022-06-26 09:52:16 +08:00
79ad05eec6 [fix](doe) fix doe on es v8 (#10391)
doris on es8 can not work, because type change. The use of type is no longer recommended in es7,
and support for type has been removed from es8.

1. /_mapping not support include_type_name
2. /_search not support use type
2022-06-26 09:51:29 +08:00
eebfbd0c91 Revert "[fix](vectorized) Support outer join for vectorized exec engine (#10323)" (#10424)
This reverts commit 2cc670dba697a330358ae7d485d856e4b457c679.
2022-06-25 22:18:08 +08:00
7fe4b20da3 [feature-wip](multi-catalog) refactor catalog interface (#10320) 2022-06-25 21:51:54 +08:00
8abd00dcd5 [feature-wip](multi-catalog) Add catalog name to information schema. (#10349)
Information schema database need to show catalog name after multi-catalog is supported.
This part is step 1, add catalog name for schemata table.
2022-06-25 11:53:04 +08:00
3757bd521a [feature](nereids)Convert the expression from nereids to stale expr. (#10343)
Add ExpressionConverter.java to convert the expression from nereids to stale expression
2022-06-25 11:16:52 +08:00
476be35961 [TYPO] fix typo 'destory' -> 'destroy' (#10373) 2022-06-24 19:11:28 +08:00
e82d8433be [feature](nereids) Integrate nereids into current SQL process framework (#10304)
To integrate the nereids optimizer with new SQLParser and Planner to existing SQL process framework, I abstract a interface which named "Planner" and let the Both planner from nereids and stale optimizer implement it, to disguish it
with origin Planner, I rename the Planner to OriginalPlanner.

As we don't want to impact the existing logic too much, I defined a LogicalPlanAdapter to adapt the logicalPlan that is the output of the new paser to the existing code.

Besides, as the MySQL protocol supports sending multiple statements in one packet, so I add Nereids#SparseSQL method to handle this properly.
2022-06-24 18:26:26 +08:00
8f2b2b4457 add dynamic partition DataProperty (#10338) 2022-06-24 16:57:56 +08:00
8a49c7ef04 [chore] Rename Doris binary output format 2022-06-24 15:30:05 +08:00
516f5b1789 [feature-wip](multi-catalog) support to switch catalog (#10381)
Add `switch catalog` stmt with privilege check
2022-06-24 10:42:13 +08:00
2cc670dba6 [fix](vectorized) Support outer join for vectorized exec engine (#10323)
In a vectorized scenario, the query plan will generate a new tuple for the join node.
This tuple mainly describes the output schema of the join node.
Adding this tuple mainly solves the problem that the input schema of the join node is different from the output schema.
For example:
1. The case where the null side column caused by outer join is converted to nullable.
2. The projection of the outer tuple.
2022-06-24 08:59:30 +08:00
e3d549cdfa [fix](proc) Fix bug that TrashProcDir cannot show backend trash detail normally (#10365) 2022-06-24 08:56:32 +08:00
d5be190cf9 [fix](planner)infer predicate rule infer binary pridicate when two slot do not equal by mistake (#10356)
infer predicate rule infer binary predicate when two slot do not equal by mistake
2022-06-24 08:56:12 +08:00
f06a06d623 [chore](fe)remove java doc period end check in checkstyle (#10329)
We do not generate real java doc. All java doc comments is used to help to understand the code logic more easily.
So we need loose java doc style check. Remove period character check in summary java doc check rule.
2022-06-24 08:55:53 +08:00
b8d2c96842 [refactor]Remove load_delete job (#10353) 2022-06-24 00:04:38 +08:00
a5fea86d0a [fix][ldap] fix ldap password null pointer exception. (#10284) 2022-06-23 15:01:18 +08:00
6a54fc2fe5 [feature-wip](multi-catalog)(resubmit) add catalog level privileges (#10345) 2022-06-23 14:10:11 +08:00
e9662e2861 [docs] fix HelpTopic for key words (#10276) 2022-06-23 12:42:49 +08:00
4d444733d3 MOD: sql block rule support exists (#10316) 2022-06-23 12:38:30 +08:00
815ea35578 [fix](multi-catalog) should load datasource before loading cluster (#10330)
A temp DataSourceMgr is created when catalog intializes, and will be
updated in the loadCluster process. However, the loadDatasource process
will create a new DataSourceMgr with no cluster updated, and write such
DatasourceMgr to image. Finally, when the doris starts to recover, no
cluster is available.
2022-06-23 10:59:12 +08:00
46d20818f1 [fix][vectorized] Fix bug the of window function result not match plan nullable (#10340)
Co-authored-by: lihaopeng <lihaopeng@baidu.com>
2022-06-23 08:40:12 +08:00
a2b5020375 [fix](partition-cache) fix result may not write when enable partition cache (#10319)
fix result may not write when enable partition cache
2022-06-22 23:42:46 +08:00
2bd8b0713a [feature](Nereids): cost and stats; (#10199)
feature: cost and stats;

+ Add cost model data struct.
+ Add operator visitor for calculating cost.
+ Add plan context.
2022-06-22 22:46:22 +08:00
8204b41d88 [feature](nereids)temporary disable exploration jobs in cascades (#10290)
Only do implementation in cascades.

In order to achieve the ssb test, at this stage, temporarily comment out the explore rule process in cascades.
It needs to be added in the future.
2022-06-22 20:05:01 +08:00
2a0ac05ce7 [fix] Fix duplicate code for PropertyAnalyzer.analyzeDataProperty() (#10190)
PropertyAnalyzer.analyzeDataProperty(Map<String, String> properties, final DataProperty oldDataProperty) has something not suitable.
Parameter oldDataProperty is the old DataProperty, properties should be used to replace some of its members.
If properties has no some members, old ones need to be left, but not be set to default value.
Function modifyPartitionsProperty() uses analyzeDataProperty(), but create a new DataProperty again, it is duplicate.
2022-06-22 15:28:04 +08:00
239ef84835 [Minor](nereids): Get plan directly (#10270) 2022-06-22 14:07:28 +08:00
531c9abac8 [feature](nereids) Add ssb related expressions and PlanNode (#10227)
Add related expressions and AggPlan and SortPlan.

This PR includes the addition of the following expression types:
Arithmetic/BetweenPredicate/CompoundPredicate/FunctionCall.

PlanNode:
LogicalAggregation/LogicalSort

Add a ut to verify related expressions and node parsing
2022-06-22 11:54:28 +08:00
83803d1968 [feature](nereids) implementation rules. (#10194) 2022-06-21 23:34:08 +08:00
Pxl
b3b054c9ff [fix](schema-change) fix schema_change failed because of emtpy origin_column_name passed and fix ut fail on isFullyQualified (#10281) 2022-06-21 19:53:58 +08:00
47dba440d0 Revert "[feature-wip](multi-catalog) add CatalogPrivTable to support unified authority management of datalake (#10246)" (#10297)
This reverts commit 41cb4c8f9cf1b58fb33a1e46d2b7db803a15a59f.
2022-06-21 15:55:15 +08:00
24732126d2 [feature-wip](Nereids)Add bind slot reference rules and support any/multi/group/multigroup with predicate pattern (#10241)
Add bind slot reference rules and support any/multi/group/multigroup with predicate pattern
2022-06-21 10:51:46 +08:00
41cb4c8f9c [feature-wip](multi-catalog) add CatalogPrivTable to support unified authority management of datalake (#10246)
Supported:
1. Change FeMetaVersion to 111, compatible with upgrade from 110.
2. Add catalog level privileges, and degrade global level privileges to catalog level if FeMetaVersion < 111.
3. Support 'show all grants', 'show roles' statement.
4. Previous version of SQL syntax.

Todo:
1. three-segment format catalog.database.table in SQL syntax.
2. User document for the unified authority management of datalake.
3. LDAP services to provide authentication.
2022-06-21 10:26:50 +08:00
dd39287a0a [fix](compile) Fix compile error in external file scan node (#10274) 2022-06-20 22:39:32 +08:00
8a8d24b4a6 [feature-wip](multi-catalog) External file scan node (#9973) 2022-06-20 17:46:24 +08:00
8531dcb885 [refactor](nereids) Abstract interface of statistics framework for new optimizer reuse (#10240)
As the statistics framework could not be reused by new optmizer before, so I abstract some interface to make it reusable.

1. Make Slot extends the Id
2. Add new interface:ExprStats,PlanStats
3. Move definition of PlanNode.NodeType to statistics sub-directory
2022-06-20 15:16:06 +08:00
087fc596b1 [feature] add remote storage policy config for create table properties (#10159)
Add remote storage policy config for create table properties. It will set storage policy for table and partitions in `CREATE TABLE` and `ALTER TABLE`.
This policy will be used when partition is being migrated from local to remote.
grammy:
1.
`CREATE TABLE TblPxy1
(...)
ENGINE=olap
DISTRIBUTED BY HASH (aa) BUCKETS 1
PROPERTIES(
    "remote_storage_policy" = "testPolicy3"
);`
2.
`ALTER TABLE TblPxy01 SET ("remote_storage_policy" = "testPolicy3");`
3.
`ALTER TABLE TblPxy01 MODIFY PARTITION p2 SET ("remote_storage_policy" = "testPolicy3");`
2022-06-20 12:42:23 +08:00
2f37e108e3 [feature-wip](array-type) add ArrayType support for FeFunctions (#10041)
FEFunctionSignature do not support ArrayType as args, then following SQL failed:
`> select array_contains([1,2,3], 1);`
ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: org.apache.doris.catalog.ArrayType cannot be cast to org.apache.doris.catalog.ScalarType
2022-06-20 09:35:06 +08:00
9a1f1c3864 [improvement](variables) change session variable when set global variable (#10238)
Currently, when setting variables with `global` keywords, it will not affect the
current session variable's value. That is always make user confused.

This CL mainly changes:

1. Change session variable when set global variable
2022-06-20 09:05:50 +08:00
f728fd4933 [fix](auth) Authentication exception when the name of database or table contains an underscore in grant statement. (#10213) 2022-06-19 22:20:01 +08:00
67f341f44e [TLP](step-1) Remove incubator prefix (#10230)
Remove some `incubator-` prefix in source code.
The document is not modified, will be done in next PR.
2022-06-19 19:34:52 +08:00