Move the logic for version+1 from `unprotectedCommitTransaction `to`FinishTransaction`, as the write lock for the table was obtained in `FinishTransaction`
1. In cloud mode, get visible version is a rpc to metaservice, while
loads would get visible version for all partitions.
2. VunionNode should follow batch size.
The log file names are in the format fe.log.${date}-${index}, e.g.
```
fe.log.20240311-1
fe.log.20240311-2
fe.log.20240311-3
...
```
In the previous, fe.log/fe.audit.log will be renamed to fe.log.xxx-1/fe.audit.log.xxx-1
with the minimum index `1` when they reach rotation size. e.g.
```
fe.log.20240311-1 -> fe.log.20240311-2
fe.log.20240311-2 -> fe.log.20240311-3
fe.log.20240311-3 -> fe.log.20240311-4
fe.log -> fe.log.20240311-1
```
there are some drawbacks
1. log4j needs to rename all existing rotated log to spare the
index `1`
2. it's hard to deal with the duplicated names, because every time the
log rotates, it starts from index `1`
After this change, the log will rename to a file name with larger index
instead of `1`. e.g. when rotate
```
fe.log.20240311-1
fe.log.20240311-2
fe.log.20240311-3
fe.log -> fe.log.20240311-4
```
- fix syntax problems of only one table used in leading or mistake usage of brace
example: leading(t1),leading(t1 {t2})
- fix cte used in subquery of using leading
example: with cte as (select c1 from t1) select count(*) from t1 join (select /*+ leading(cte t2) */ c2 from t2 join cte on c2 = cte.c1) as alias on t1.c1 = alias.c2;
which cte used in subquery and subquery also have leading
- fix data mismatched with original plan cause of on predicate push to nullable side
example: select count(*) from t1 left join t2 on c1 > 500 and c2 > 500 can not change to select count(*) from t1 left join t2 on c2 > 500 where c1 > 500
Fix problem that if fe upgrade from a older version, it has error like:
```
MySQL [test]> show full tables;
ERROR 1105 (HY000): NullPointerException, msg: java.lang.NullPointerException: Cannot invoke "org.apache.doris.thrift.TInvertedIndexStorageFormat.toString()" because the return value of "org.apache.doris.catalog.OlapTable.getInvertedIndexStorageFormat()" is null
```
db reported a error " expression duplicate in grouping set" when there are duplicate expression in grouping set.
e.g.select a from mal_test1 group by grouping sets((a,a))
This pr removes duplicate expr in grouping set :
select a from mal_test1 group by grouping sets((a))
The bug is introduced by #27184
Profile Format is :
Summary
MergedProfile
ExecutionProfile1
ExecutionProfile2
...
There maybe multiple execution profiles for broker load.