Commit Graph

8302 Commits

Author SHA1 Message Date
2ed4eac6f8 [feature](Nereids) add scalar function width_bucket (#16106) 2023-01-20 11:31:17 +08:00
73621bdb18 [enhance](Nereids) process DELETE_SIGN_COLUMN of OlapTable(#16030)
1. add DELETE_SIGN_COLUMN in non-visible-columns in LogicalOlapScan
2. when the table has a delete sign, add a filter `delete_sign_coumn = 0`
3. use output slots and non-visible slots to bind slot
2023-01-20 11:27:35 +08:00
6485221ffb [Feature-WIP](inverted index)(bkd) Support try query before query bkd to improve query efficiency (#16075) 2023-01-20 11:19:36 +08:00
6c5470b163 [typo](docs) fix error path in ssb/tpch docs (#16108)
* fix docs error path

* commit suggestionns
2023-01-20 11:07:12 +08:00
5b2191a496 [fix](multi-catalog)Make ES catalog and resource compatible (#16096)
close #16099 

1. Make ES resource compatible with `username` property. Keep the same behavior with ES catalog.
2. Change ES catalog `username` to `user` to avoid confusion.
3. Add log in ESRestClient and make debug easier.
2023-01-20 09:31:57 +08:00
b230b704d2 [Update](thirdparty) omit BUILD_TYPE for clucene, ignore other build type except RelWithDebInfo (#16076)
omit BUILD_TYPE for clucene, ignore other build type except RelWithDebInfo
2023-01-20 09:10:58 +08:00
85c2060862 [Minor](Nereids): minor fix (#16095) 2023-01-20 00:53:11 +08:00
43dade0f68 [fix](doc): fix some spelling mistaks (#16097) 2023-01-19 23:31:45 +08:00
2018b49ef0 [opt](test) scalar_types_p0 use 100k lines dataset and scalar_types_p2 use 1000k (#16104) 2023-01-19 22:59:29 +08:00
69a3ecfd51 [Fix](inverted index) fix add nulls bug for inverted fulltext index (#16078)
We found a problem with inverted index when parser=english,
if there were nulls in columns when flushing inverted index for them, it can cause CLucene throwing an exception.
2023-01-19 21:21:44 +08:00
379ba73675 [enhance](nereids) tightestCommonType of datetime and datev2 is datev2 (#16086)
in original planner, tightestCommonType of datetime and datev2 is datev2.
make nereids compatible with original planner.
2023-01-19 19:55:19 +08:00
6cff651f71 [enhancement](statistics) add some methods to use histogram statistics (#15755)
1. Fix the histogram document
2. Add some methods for histogram statistics

TODO:
1. use histogram statistics for the optimizer
2023-01-19 19:20:18 +08:00
c1dd1fc331 [fix](nereids): fix all bugs in mergeGroup(). (#16079)
* [fix](Nereids): fix mergeGroup()

* polish code

* fix replace children of PhysicalEnforcer

* delete `deleteBestPlan`

* delete `getInputProperties`

* after merge GroupExpression, clear owner Group
2023-01-19 19:15:05 +08:00
dd869077f8 [fix](nereids) do not generate compare between Date to Date (#16061)
BE storage Engine has some bug in Date comparison, and hence if we push down predicates like Date'x' < Date 'y', we get error results.
This pr just convert expr like ’Date'x' < Date 'y',‘ to DateTime'x' < DateTime 'y'

TODO:
do storage engine support date slot compare with datetime?
if it support, we could avoid add cast on the slot
and then, this expression could push down to storage engine.
2023-01-19 15:56:51 +08:00
74c0677d62 [fix](planner) fix bugs in uncheckedCastChild (#15905)
1. `uncheckedCastChild` may generate redundant `CastExpr` like `cast( cast(XXX as Date) as Date)`
2. generate DateLiteral to replace cast(IntLiteral as Date)
2023-01-19 15:51:08 +08:00
21b78cb820 [fix](nereids) Fix bind failed of the slots in the group by clause (#16077)
Child's slot with same name to the slots in the outputexpression would be discarded which would cause the bind failed, since the slots in the group by expressions cannot find the corresponding bound slots from the child's output
2023-01-19 15:36:13 +08:00
0144c51ddb [fix](nereids) fix bug in CaseWhen.getDataType and add some missing case for findTightestCommonType (#15776) 2023-01-19 15:30:25 +08:00
f9406234c6 [ComputeNode](Doc)Add document for compute node (#15743)
Issue Number: close #13144
2023-01-19 15:16:14 +08:00
47aa53fa72 [fix](multi-catalog)switching catalogs after dropping will get NPE. (#16067)
Issue Number: close #16066
2023-01-19 15:13:21 +08:00
b9f1e4a17f [typo](doc)update jfs docs (#16090) 2023-01-19 15:10:49 +08:00
6e090e4daf [Bug](predicate) fix date predicate (#16053) 2023-01-19 14:14:48 +08:00
c5beab39c0 [fix](nereids) Bind slot in having to its direct child instead of grand child (#16047)
For example, in this case, the `date` in having clause should be bind to alias which has same name, instead of `date` field of the relation

SELECT date_format(date, '%x%v') AS `date` FROM `tb_holiday` WHERE `date` between 20221111 AND 20221116 HAVING date = 202245 ORDER BY date;
2023-01-19 13:19:16 +08:00
abdf56bfa5 [fix](Nereids) wrong result of group_concat with order by or null args (#16081)
1. signatures without order element are wrong
2. signature with one arg is miss
3. group_concat should be NullableAggregateFunction
4. fold constant on fe should not fold NullableAggregateFunction with null arg

TODO
1. reorder rewrite rules, and then only forbid fold constant on NullableAggregateFunction with alwaysNullable == true
2023-01-19 11:22:30 +08:00
e846e8c0fd [enhance](Nereids): remove Group constructor for UT. (#16005) 2023-01-19 11:13:23 +08:00
05f0f63718 [fix](daemon) should use GetMonoTimeMicros() (#16070) 2023-01-19 10:44:06 +08:00
0b5e71d3b4 [refactor](refactor field) remove unused method (#16068) 2023-01-19 10:16:09 +08:00
3894de49d2 [Enhancement](topn) support two phase read for topn query (#15642)
This PR optimize topn query like `SELECT * FROM tableX ORDER BY columnA ASC/DESC LIMIT N`.

TopN is is compose of SortNode and ScanNode, when user table is wide like 100+ columns the order by clause is just a few columns.But ScanNode need to scan all data from storage engine even if the limit is very small.This may lead to lots of read amplification.So In this PR I devide TopN query into two phase:
1. The first phase we just need to read `columnA`'s data from storage engine along with an extra RowId column called `__DORIS_ROWID_COL__`.The other columns are pruned from ScanNode.
2. The second phase I put it in the ExchangeNode beacuase it's the central node for topn nodes in the cluster.The ExchangeNode will spawn a RPC to other nodes using the RowIds(sorted and limited from SortNode) read from the first phase and read row by row from storage engine.

After the second phase read, Block will contain all the data needed for the query
2023-01-19 10:01:33 +08:00
c7a72436e6 [Feature](multi-catalog)Add support for JuiceFS (#15969)
The broker implements the interface to juicefs,It supports loading data from juicefs to doris through broker.
At the same time, it also implements the multi catalog to read the hive data stored in juicefs
2023-01-19 08:54:16 +08:00
wxy
7288f1f1d4 [Fix](profile) do not send export profile when enable_profile=false. (#15996) 2023-01-19 08:06:39 +08:00
c43edbdfea [bug](cooldown)fix bug for single cooldown (#16040)
* fix bug for single cooldown

* fix bug for single cooldown
2023-01-19 08:03:32 +08:00
45b39c5aaf [enhancement](regression-test) Support BenchmarkAction (#16071)
Support benchmarkAction for regression test, this action can help us to run the benchmark queries and print the result

example:

benchmark {
    executeTimes 3
    warmUp true
    skipFailure true
    printResult true

    sqls(["select 1", "select 2"])
}
2023-01-19 08:02:05 +08:00
76622bcab4 [enhance](FE): remove constructor just used for UT and useless ERROR code (#16080)
* [enhance](FE): remove constructor just used for UT.

* [enhance](FE): remove useless ERROR Code

* fix checkstyle
2023-01-19 08:00:48 +08:00
d8f598eeab [enhancement](Nereids) add timestampadd, timestampdiff functions (#16072) 2023-01-19 01:05:25 +08:00
2acf634f84 [CleanUp](FE): cleanup useless code in FE. (#16058) 2023-01-18 22:25:41 +08:00
baf62b4418 [test](Nereids) add regression-test for running_difference and regexp_extract_all (#16049) 2023-01-18 22:24:52 +08:00
78ba446487 [Enhancement](Nereids) add more clear message when parse failed (#16056) 2023-01-18 22:19:46 +08:00
cbcd5228b7 [enhance](nereids): polish code for mergeGroup(). (#16057) 2023-01-18 21:03:46 +08:00
feeb69438b [opt](Nereids) optimize DistributeSpec generator of OlapScan (#15965)
use the size of selected partitions instead of olap table partition size to decide whether generate hashDistributeSpec
2023-01-18 20:18:11 +08:00
34075368ec (improvement)[bucket] Add auto bucket implement (#15250) 2023-01-18 19:50:18 +08:00
0916cbcb10 [ehancement](nereids) Made the parse for named expression more complete (#16010)
After this PR, we could support such grammar.

SELECT SUBSTRING("dddd编", 0, 3) AS "测试";
SELECT SUBSTRING("dddd编", 0, 3) "测试";
2023-01-18 19:44:51 +08:00
ee76b9796c [Bug](regresstest) BE Crash in DEBUG mode run regress test (#16042) 2023-01-18 17:58:16 +08:00
95c91fab2e [refactor](vec) delete non-vec runtime filter (#16016)
* [refactor](vec) delete non-vec runtime filter

* update
2023-01-18 17:49:20 +08:00
4035bd83c3 [fix](jdbc) fix jdbc driver bug and external datasource p2 test case issue (#16033)
Fix bug that when create jdbc resource with only jdbc driver file name, it will failed to do checksum
This is because we forgot the pass the full driver url to JdbcClient.

Add ResultSet.FETCH_FORWARD and set AutoCommit to false to jdbc connection, so to avoid OOM when fetching large amount of data

set useCursorFetch in jdbc url for both MySQL and PostgreSQL.

Fix some p2 external datasource bug
2023-01-18 17:48:06 +08:00
bac2adfc74 [refractor](schema) refractor schema::get_predicate_column_ptr (#16043)
* refractor Schema::get_predicate_column_ptr

* update code format

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2023-01-18 17:47:37 +08:00
5265f5142f [fix](Nereids) add string and character type (#16044) 2023-01-18 17:27:45 +08:00
1fa2b662cf [opt](Nereids) add date_add/sub function (#16048)
1. add week_add week_diff function
2. register all date_add/date_diff function
2023-01-18 17:11:44 +08:00
94628f09e9 [regression-test](spark-connector) Add the regression case of the spark doris connector (#14877)
* [regression-test](spark-connector) Add the regression case of the spark doris connector
2023-01-18 16:41:41 +08:00
bd0d650c3d [fix](Nereids) prohibit cross join with on clause (#16035) 2023-01-18 16:21:01 +08:00
d257059e6b [refactor](remove hadoop dpp) remove hadoop dpp code since it is not used (#16009) 2023-01-18 15:01:04 +08:00
de0e402e52 [fix](nereids) bucket shuffle join use wrong shuffled column info (#16011) 2023-01-18 14:44:36 +08:00