Commit Graph

6074 Commits

Author SHA1 Message Date
8251e7cbfc [refactor](column) remove confused field (#12187) 2022-08-31 09:13:31 +08:00
f72d2559cf [fix](compile) Fix compile error '<unknown>' may be used uninitialized in PODArray::insert_prepare #12202 2022-08-31 09:12:28 +08:00
f949262ddf [fix](planner) a slot id is bounded on a wrong tuple id, if cross join has a hash join as child (#12156) 2022-08-31 09:07:55 +08:00
22430cd7bb [feature](stmt) add ADMIN COPY TABLET stmt for local debug (#12176)
Add a new stmt ADMIN COPY TABLET for easy copy a tablet to local env to reproduce problem.
See document for more details.
2022-08-31 09:06:49 +08:00
172c213fbc [fix](Nereids)get NPE from finalize TimestampArithmeticExpr that generated by ExpressionTranslator (#12163)
This PR:
1. refactor getDataType in TimestampArithmetic
2. set TimeUnit correctly when translate TimestampArithmetic to TimestampArithmeticExpr
2022-08-30 21:59:28 +08:00
59e5527eb0 [feature](Nereids)enable CBO optimize stage in Nereids (#12008)
- enable CBO stage in Nereids
- use the `chooseBestPlan()` to get the best plan
- add a new rule JoinCommuteProject
- test the stage by JoinCommute rule
2022-08-30 21:28:17 +08:00
dda446f490 fix typos in get-starting.md (both en and zh-CN) (#12189) 2022-08-30 20:52:24 +08:00
fdd236cc9b [fix](simdjson) disable simdjson by default, wait for fix the bug (#12179) 2022-08-30 20:24:46 +08:00
de4bdc7f6f [fix](Nereids)Sum return DoubleType when child is DecimalType by mistake (#12169)
When Sum's child is Decimal, Return Double Type by mistake lead to result error, so we should keep the return type to decimal when the child expression's type is decimal.
2022-08-30 19:53:25 +08:00
f6a10e9ea3 [refactor](Nereids)refactor memo.copyIn (#12147)
this pr do 2 refactor
1. remove useless parameter from `Plan#computeOutput`
2. refactor memo.copyIn

It the past, `memo.copyIn` has complex logic to process init, rewrite and copyIn, It's difficult to understand and easy to meet bug and leak memory for some unreachable group/groupExpression.

So I separate it into three methods:
1. `Memo.init` for init Memo by LogicalPlan
2. `Memo.doRewrite` for rewrite
3. `Memo.doCopyIn` for exploration and implementation

And separate the UT into 3 files
1. `MemoInitTest`
2. `MemoRewriteTest`
3. `MemoCopyInTest`

I have added a lots of UT for `Memo.rewrite`, and add some unreachable DAG check in the PlanChecker, when the plan is changed.
2022-08-30 19:36:04 +08:00
fc400a15db [fix] (docs) Fix Data type: string length and parameter description (#11565) 2022-08-30 19:16:00 +08:00
9c7016f6e7 [docs](query plan) Add a description explain graph and desc graph and explain verbose (#11697)
* docs: 增加explain graph与desc graph描述,避免文档前后描述不一致

* docs: add the usage docs of `explain verbose`
2022-08-30 19:12:23 +08:00
370b92a2ea [Bug](compile) fix clang build for be (#12183) 2022-08-30 17:58:54 +08:00
9a74ad1702 [feature](Nereids)add the ability of projection on each ExecNode and add column prune on OlapScan (#11842)
We have added logical project before, but to actually finish the prune to reduce the data IO, we need to add related supports in translator and BE.
This PR:
- add projections on each ExecNode in BE
- translate PhysicalProject into projections on PlanNode in FE
- do column prune on ScanNode in FE

Co-authored-by: HappenLee <happenlee@hotmail.com>
2022-08-30 16:17:10 +08:00
fb27e3ef31 [fix](planner) let OlapScanNode turn off preaggragation when there is a filter on DELETE_SIGN (#12118)
We can skip aggregate on replace column, otherwise it would generate
wrong result. e.g. a row in UNIQUE is deleted by delte_sign_column,
then it would be returned.
2022-08-30 15:54:37 +08:00
eea756fd5b [docs](hive)add hadoop.username config item (#12109)
add hadoop.username config item
2022-08-30 12:34:27 +08:00
7f295fc2fb [typo](doc)Modify data operation documentation (#12137)
fix data operate doc
2022-08-30 12:34:01 +08:00
dcad318fcc [Doc](flink-connector) update sample code url (#12149)
update sample code url
2022-08-30 12:33:31 +08:00
a16cf0e2c8 [feature-wip](scan) add profile for new olap scan node (#12042)
Copy most of profiles from VOlapScanNode and VOlapScanner to NewOlapScanNode and NewOlapScanner.
Fix some blocking bug of new scan framework.
TODO:

Memtracker
Opentelemetry spen
The new framework is still disabled by default, so it will not effect other feature.
2022-08-30 10:55:48 +08:00
8370115cf6 [enhancement](memtracker) Improve performance of tracking real physical memory of PODArray #12168 2022-08-30 10:22:12 +08:00
2f192019d3 [bugfix](delete hanlder) delete predicate is merged and could not find schema cause core dump (#12161)
Co-authored-by: yiguolei <yiguolei@gmail.com>
2022-08-30 09:18:21 +08:00
Pxl
67e94d2aea [Enhancement](compaction) add compaction use time count (#12141) 2022-08-30 09:18:02 +08:00
c885913efe Fixed incorrect description of column length limit in partition bucketing documentation. (#12154)
Signed-off-by: manyi <fop@freeoneplus.com>

Signed-off-by: manyi <fop@freeoneplus.com>
Co-authored-by: manyi <fop@freeoneplus.com>
2022-08-30 00:00:51 +08:00
c3db282d8e [chore](git) Some paths should be tracked by git (#12072) 2022-08-29 23:24:13 +08:00
2715ff9e0f [Enhancement](select) Make select variables request handled in fe without be to avoid potential blocked problem when login (#12111) 2022-08-29 23:07:30 +08:00
580b8dd3ec [improve](Nereids)make some DataType's constructor's access level to private (#12143)
include these types:
- NullType
- BooleanType
- TinyIntType
- SmallIntType
- IntegerType
- BigIntType
- LargeIntType
- FloatType
- DoubleType
- DateType
- DateTimeType
- StringType
2022-08-29 21:21:24 +08:00
09b8d32421 [fix](memtracker) Fix mem limit exceed return wrong format (#12139) 2022-08-29 21:07:02 +08:00
e48b691139 Failed to get doris_odbc_name value in mysql_to_doris, replace driver value error (#11965)
Failed to get doris_odbc_name value in mysql_to_doris, replace driver value error
2022-08-29 19:13:54 +08:00
47c89d49f0 [fix](array-type) array can not be distributed key and aggregation key (#12082)
Array column should not be distributed key or group by or aggregate key, we should forbid it before create table.
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-08-29 17:29:23 +08:00
b2c85d753f Revert "[behavior change](planner)change Doris's query organization syntax to standard sql (#9745)" (#12135)
Reverts apache/doris#9745
This may cause NPE when calling `parseDefineExprWithoutAnalyze()`
2022-08-29 16:29:09 +08:00
Fy
c0b56400ed [feature](nereids)support one expression-rewrite rule: inPredicateToEqualTo (#12046)
Add one expression rewrite rule:
rewrite InPredicate to an EqualTo Expression, if there exists exactly one element in InPredicate Options.

Examples:
1. where A in (x) ==> where A = x
2. where A not in (x) ==> where not A = x
2022-08-29 15:54:06 +08:00
1d9d99c8ec [fix](Nereids)join output order need same with child plan node output when translate (#12130)
In BE, There is an implicit convention that HashJoinNode's left child's output Slot must before right child's output slot in intermediateTuple.

However, after we do commute rule on join plan in Nereids, this convention will be broken and cause core dump in BE.

There are two way to fix this problem:
1. add a project on join after we do commute
2. reorder output of join node when we do translate

Since we cannot translate project yet because BE projection support is on going(#11842). So we use second way to fix it now. After the project translation could work correctly, we should use the first way to fix it.
2022-08-29 15:32:55 +08:00
454e21daca [Docs](array type) Update array type documentation (#12097) 2022-08-29 15:03:26 +08:00
ed131b8eb0 [Bugfix](coredump) fix coredump cause by fmt::format param malformt (#12138)
fix coredump cause by fmt::format param malformt
2022-08-29 12:45:22 +08:00
af09c1f4eb [Improvement](window funnel) restrict timestamp to datetime type in window funnel (#12123) 2022-08-29 12:14:04 +08:00
957bf98784 [docs](remote-udaf) change title (#12133) 2022-08-29 12:11:48 +08:00
5f7d6e8f2b [Refactor](predicate) Unify Conditions and ColumnPredicate (#11985) 2022-08-29 12:11:22 +08:00
3ca6f34c87 [fix](view) Fix view not showing specific lengths for varchar type (#12107) 2022-08-29 12:09:48 +08:00
Pxl
7829c21b20 [Bug](lateral-view) fix some conjunct not work on lateral view #12105 2022-08-29 12:08:20 +08:00
fb7c42a4e3 [fix](fe) Fixed alterOp from HashSet to EnumSet (#12094)
Change the HashSet to EnumSet of the AlterOp's currentOps for better performance
2022-08-29 12:07:31 +08:00
62e3bd338e [refactor](BE) return error status when vslot_ref contains invalid slot_id (#12106)
In current implementation, we detect invalid slot at execute phase. At execute phase, it is hard to get useful information for further debug. This pr moves error detection ahead to prepare phase, so that we can log related tuple descriptors.
2022-08-29 12:07:08 +08:00
db07e51cd3 [refactor](status) Refactor status handling in agent task (#11940)
Refactor TaggableLogger
Refactor status handling in agent task:
Unify log format in TaskWorkerPool
Pass Status to the top caller, and replace some OLAPInternalError with more detailed error message Status
Premature return with the opposite condition to reduce indention
2022-08-29 12:06:01 +08:00
eb3e0b2f7d [test](Nereids): add more plan equals test for Nereids (#12127)
- add more plan equals test for Nereids
- fix join equals bugs
2022-08-29 11:46:30 +08:00
ac425d4bf3 [fix](remote)Fix bug for cache reader (#12104) 2022-08-29 11:28:17 +08:00
fe9767941d [fix](array-type) adjust enable_array_type config (#12071)
Problem:
1. `enable_array_type` is masterOnly;
2. dynamic open config only affect FE MASTER
`admin set frontend config("enable_array_type"="true");`
3. query in FE FOLLOWER will fail, because of `enable_array_type` is false in FE FOLLOWER
`select * from table_with_array `

Solution:
Only check `enable_array_type` while creating new tables with array column.

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-08-29 11:10:52 +08:00
44c4a45f72 [fix](array-type) fix the wrong data when use stream load to import '\N' (#12102)
Co-authored-by: hucheng01 <hucheng01@baidu.com>
2022-08-29 09:53:37 +08:00
7fbcf3c8ba [api-change](http) change kill query http api by using query id (#12120)
Now user can cancel query id by http by following steps:

Get query id by trace id
cancel query by query id
The modified api has not been released yet.
2022-08-29 09:51:51 +08:00
dec576a991 [feature-wip](parquet-reader) generate null values and NullMap for parquet column (#12115)
Generate null values and NullMap for the nullable column by analyzing the definition levels.
2022-08-29 09:30:32 +08:00
f26c051835 [Typo](doc) Rewrite the Quick Start document (#11956) 2022-08-29 09:25:58 +08:00
acd7ab379d [feature](Nereids)add range partition prune (#11964)
1. Rewrite Filter(Project) to Project(Filter) to make sure when do partition prune the tree looks like this: Project(Filter(OlapScan)).
2. Enable the MergeConsecutiveProject MergeConsecutiveFilter rules.
3. prune range partition just like what Legacy Planner do.
2022-08-28 23:39:09 +08:00