Commit Graph

247 Commits

Author SHA1 Message Date
dadfd85c40 prune for agg with constant expr (#12274)
Currently, nereids doesn't support aggregate function with no slot reference in query, since all the column would be pruned, e.g.

SELECT COUNT(1) FROM t;

This PR reserve the column with the smallest amount of data when doing column prune under this situation.

To be noticed, this PR ONLY handle aggregate functions. So projection with no slot reference need to be handled in future.
2022-09-05 19:09:00 +08:00
8bfb89c100 [feature-wip](array-type) Add some regression tests for nested array (#12322)
#11392 made _input_block in each BetaRowsetReaders sharable. However, for some types (e.g. nested array with more than 1 depth), the _column_vector_batches in RowBlockV2 can be nested which means that there is a ColumnVectorBatch inside another ColumnVectorBatch. In this case, the data of inner ColumnVectorBatch
may be corrupted because the data of _input_block is copied shallowly to the _output_block.
2022-09-05 14:05:24 +08:00
34dd67f804 [feature](nereids) add weekOfYear to support ssb-flat benchmark (#12207)
support function WeekOfYear
In current implementation, WeekOfYear can be used in where clause, but not in select clause.
2022-09-03 12:04:51 +08:00
e7303c12c7 [Enhancement](array-type) Support Floating/Decimal type for array aggregation functions (#12271) 2022-09-03 09:55:56 +08:00
0d33c713d1 [Bug](CTAS) Fix CTAS error for use agg column as first. (#12299)
* FIX: ctas default use duplicate key.
2022-09-02 20:44:01 +08:00
f8eb480bec [fix](emptynode)fix empty node bug in vec engine (#12258)
* [fix](emptynode)fix empty node bug in vec engine

* update fe ut
2022-09-01 18:52:10 +08:00
3bcab8bbef [feature](function) support now/current_timestamp functions with precision (#12219)
* [feature](function) support now/current_timestamp functions with precision
2022-09-01 14:35:12 +08:00
f294d33332 [bugfix](index) index page should not be bitshuffle decoded (#12231)
* [bugfix](index) index page should not be bitshuffle decoded

* minor change
2022-09-01 11:56:44 +08:00
fc05d54f0d [fix](array-type) array_sort function with empty input #12175
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-09-01 10:54:09 +08:00
65051d67cf [fix](yearweek) fixed the yearweek result error when mode is set to 1 (#12234) 2022-09-01 09:46:38 +08:00
d7e02a9514 [fix](join)join reorder by mistake (#12113) 2022-09-01 09:46:01 +08:00
3cdd19821d [fix](sort)the slot in sort node should be nullable if it's outer joined (#12193)
The sort node's output expr should be nullable if it is outer joined.
2022-08-31 14:34:14 +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
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
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
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
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
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
2f88dfd7c5 [regression-test](unique) Add tpch sf0.1 test under unique table with zstd (#12122) 2022-08-27 21:39:09 +08:00
f3f17eb222 [Bugfix](load) fix be will coredump when parsing malformed json file using simdjson (#12062)
* [Bugfix](load) fix be will coredump when parsing malformed json file using simdjson
2022-08-26 18:01:19 +08:00
fba2658a1d [fix](array-type) fix the be core dump when use collect_list result to insert (#12045)
Co-authored-by: hucheng01 <hucheng01@baidu.com>
2022-08-26 18:00:43 +08:00
2b3a5b5fdd [fix](array-type) add ARRAY_BOOLEAN support for lots of array functions #12079
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-08-26 18:00:29 +08:00
Pxl
3af0745c8f [Bug](function) fix aggFnParams set not correct (#12006) 2022-08-26 14:29:56 +08:00
7b83308ffc [fix](planner) fix rewrite subquery error (#12075) 2022-08-26 14:29:14 +08:00
89d6f1231f [fix](projection)join node should always output at least one column (#12080) 2022-08-26 12:15:51 +08:00
ccff3f5711 [bugfix](light weight schema change) support delete condition in schema change (#11869)
* [bugfix](light weight schema change) support delete condition in schema change


Co-authored-by: yiguolei <yiguolei@gmail.com>
2022-08-26 11:45:55 +08:00
0f4a1e811b [Enhancement](table_function) table function node enhancement (#12038)
* table function node enhancement

* also avoid copy for non-vec table function node

* fix table function node output slots calculation while lateral view involves subquery

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-08-26 10:37:15 +08:00
2e216b9359 [fix](ut) fix ctas regression test case (#12076) 2022-08-26 08:12:11 +08:00
aec24d4da1 [feature](http) get create table stmt for a given query (#11979)
This API can help user to get all create table statement of a given SQL.
So that it will be easier to run the case in other Doris cluster.
See document for details
2022-08-25 15:02:05 +08:00
b505d6cf66 [improvement](doc test) add docs for window_funnel and refine tests (#12059)
add docs for window_funnel and refine tests
2022-08-25 11:26:40 +08:00
6e6de1853c [Bug](ctas): Ctas use default DEFAULT CURRENT_TIMESTAMP insert error (#12056) 2022-08-25 09:00:00 +08:00
0a450d96a5 [Fix] fix cast(array<not_null> as array<>) causes be core dump (#11649) 2022-08-24 22:51:30 +08:00
ec6400f0dc [feature-wip](unique-key-merge-on-write) add regression case (#11731)
Co-authored-by: yixiutt <yixiu@selectdb.com>
2022-08-24 21:27:58 +08:00
5219d2aab0 [fix](union)the result exprs of union node should substitute by child node's smap (#11933)
union node's result exprs should be substitued by child node's smap first, then the following "computePassthrough" method would have correct information to do its job.
2022-08-24 19:43:40 +08:00
d87ab69ead [bug](vectorized) fix bug of tuple is null null side do not set (#12012) 2022-08-24 16:19:43 +08:00
8b4f693ad5 [fix](grouping)fix grouping function bug (#11861) 2022-08-24 15:05:25 +08:00
81b6c8d9f9 [fix](sort)the sort expr nullable info is wrong in some case (#12003) 2022-08-24 14:26:09 +08:00
52be50972f [regression-test](p0) add case for window function at min/max when vectorized (#11989)
Co-authored-by: xiaojunjie <xiaojunjie@baidu.com>
2022-08-24 14:20:18 +08:00
f737ff742e [enhancement](Nereids)support max function (#11795)
- add aggregate function max to Nereids
- add function P0 regression test for Nereids
2022-08-24 10:54:51 +08:00
568f596330 [fix](agg)grouping_id function in having is not correctly substituted (#11834) 2022-08-24 08:50:28 +08:00
477899af8e [fix](having) Fix the with as clause containing having caused a null pointer (#12007) 2022-08-24 08:48:49 +08:00
c72a84f7c5 [fix](join)the hash join node would get the wrong nullable if the child node is cross join node (#11971)
* [fix](join)the hash join node would get the wrong nullable if the child node is cross join node
2022-08-24 08:47:52 +08:00
55fdb555be [bugfix](dict) fix coredump of dict colum range predicate when there is null value (#11967) 2022-08-23 16:07:48 +08:00
caec862d91 [feature](Nereids)add type coercion rule for nereids (#11802)
- add an interface ExpectsInputTypes to Expression
- add an interface ImplicitCastInputTypes to Expression
- add a Expression rewrite rule for type coercion
- add a Check Analysis Rule to check whether Plan is Semantically correct

if Expression implements ImplicitCastInputTypes, type coercion rule will automatic rewrite its children that casting it to the most suitable type.
If Expression implements ExpectsInputTypes, Check Analysis will check its children's type whether accepted by expects input types.
2022-08-22 23:06:02 +08:00
68e2b3db44 [regression](rollup) Modify test case (#11960) 2022-08-22 19:18:35 +08:00
Pxl
192cdd4d76 [Bug](cast) change binary predicate finally cast to varchar (#11796) 2022-08-21 10:13:47 +08:00
25b427d0c6 [Bugfix](inpredicate) fix in predicate in group by clause may cause NPE (#11886)
* [bug](inpredicate) fix in predicate in group by clause may cause NPE
2022-08-21 10:03:30 +08:00
d83c11a032 [regression](datev2) add schema change cases for datev2/datetimev2 (#11924) 2022-08-19 21:29:24 +08:00
ffe7af49c8 [fix](array-type) run 'show create table' return null (#11912)
Co-authored-by: hucheng01 <hucheng01@baidu.com>
2022-08-19 21:28:15 +08:00