should not push down topn distinct through join when the output
columns of the corresponding child of join is more than
aggregate distinct columns.
for example for LEFT_OUTER_JOIN:
left child of join's output is: c1, c2, c3.
distinct columns is: c1, c2
topn: limit 2
if we push down topn distinct, we could get result of join like this:
```
c1 c2 c3, ...
1 2 1
1 2 2
```
and the final result we get is:
```
c1 c2
1 2
```
this is wrong, because we need 2 lines, but only return 1.
use dbId replace dbName, because dbName may be renamed by Alter.
procedure key add package name (only reserved, currently no plans to support package)
Optimize procedure create and exception
1. rename old create/drop table to add/removeMemoryTable
2. add new create/drop table/db method
3. support hms catalog create/drop table/db
(cherry picked from commit b2e869c7414c68186de8d43b324ae736d7cc3463)
for this kind of sql:
create table test_default10(
a int,
b varchar(100) default current_timestamp
)
distributed by hash(a)
properties('replication_num'="1");
add check:
Types other than DATETIME and DATETIMEV2 cannot use current_timestamp as the default value
this PR support slot appearing both in agg func and grouping sets.
sql like below:
select sum(a) from t group by grouping sets ((a));
Before this PR, Nereids throw exception like below:
col_int_undef_signed cannot both in select list and aggregate functions when using GROUPING SETS/CUBE/ROLLUP, please use union instead.
This PR removes the restriction and supports this situation.
Issue Number: close #xxx
For example, the hive table is partitioned by `date` and `region`, with the following 6 partitions
```
20200101
beijing
shanghai
20200102
beijing
shanghai
20200103
beijing
shanghai
```
If the MTMV is partitioned by `date`, then the MTMV will have three partitions: 20200101, 202000102, 20200103
If the MTMV is partitioned by `region`, then the MTMV will have two partitions: beijing, shanghai
should always enable workload group because other operations depend on it for example MTMV, and spill to disk.
the normal workload group should be created in constructor.
This PR #25952 introduce a opt that if a scan node has limit and predicates, use only 1 instance to save cup and memory.
But this is wrong because we can not guarantee that the predicates can truly help to prune the data.
So I modify the logic to remove this opt.
Now, only scan node with limit and NO predicate can reduce to only 1 instance.