Alexey Antipovsky
cfa9a7ff2c
feat(optimizer): MCOL-5250 rewrite queries with DISTINCT ( #3666 )
...
* feat(optimizer): MCOL-5250 rewrite queries with DISTINCT
... as aggregated queries.
So query
```
SELECT DISTINCT <cols list>
FROM <from list>
WHERE <where clause>
HAVING <having clause>
ORDER BY <orderby list>
LIMIT <limit>
```
will become
```
SELECT *
FROM
(
SELECT <cols list>
FROM <from list>
WHERE <where clause>
HAVING <having clause>
) a
GROUP BY 1,2,3,...,N
ORDER BY <orderby list>
LIMIT limit
```
* move ORDER BY to the outer query
* fix test
* reuse cloneWORecursiveSelects() in clone()
* fix subselect columns processing
2025-09-22 16:16:37 +04:00
drrtuy
3d6e2a6bd7
chore(QA): added MTR tests for TPC-H, removed printouts and added a doc on the feature.
2025-09-11 18:35:38 +01:00
drrtuy
2506d3fe1e
fix(QA,joblist): SimpleFilter::setSimpleColumnListExtended() now populates the correct SimpleColumn list.
2025-09-10 19:50:26 +01:00
drrtuy
0d609ec485
Reapply "fix(joblist,QA): introduced extended SC ptrs collector to resolve the issue when ParseTree consist of ArithmCol-AggCol does not return SCs from AggCol."
...
This reverts commit f807ebcdfd .
2025-09-10 19:50:26 +01:00
drrtuy
f807ebcdfd
Revert "fix(joblist,QA): introduced extended SC ptrs collector to resolve the issue when ParseTree consist of ArithmCol-AggCol does not return SCs from AggCol."
...
This reverts commit 8c0c85080c .
2025-09-08 11:59:31 +00:00
drrtuy
8c0c85080c
fix(joblist,QA): introduced extended SC ptrs collector to resolve the issue when ParseTree consist of ArithmCol-AggCol does not return SCs from AggCol.
2025-09-04 13:10:18 +00:00
drrtuy
eb1de4b024
fix(rbo,rules,QA): SCs in AC->AggC->AC ParseTree are not updated with the corresponding derived table if needed.
2025-09-03 09:25:10 +04:00
drrtuy
96fc875255
fix(rbo,rules,QA): ExistsFilter::transform merges statistics to enable QA for EXISTS expressions.
2025-09-03 09:25:10 +04:00
Leonid Fedorov
0554ab3dd0
chore(format): apply clang-format
2025-09-02 12:51:39 +01:00
Leonid Fedorov
6ec363af70
MCOL-6145: mcsgetplan() UDF for CSEP printing
2025-09-02 12:51:39 +01:00
drrtuy
ea225145c0
fix(rbo,QA): SC'es CORRELATED_JOIN flag created unexpected ghost table in JobList compiler.
2025-08-28 03:46:11 +04:00
Leonid Fedorov
49691e7e10
MCOL-6148: feat(rbo): Semi-joins and correlated subqueries in filters
2025-08-22 16:09:23 +04:00
Leonid Fedorov
e28b120527
fix(rbo): fix null values handling. Crash on incomplete SimpleFilter and transform
...
(col >= bound_n-1 and col < bound_n) or col is null to
(col >= bound_n-1 or col is null) and (col < bound_n)
2025-08-22 12:59:23 +01:00
Leonid Fedorov
67370721db
feat(rbo) parallel factor via session veriable
2025-08-22 12:58:52 +01:00
Leonid Fedorov
8c3a99699c
fix(rbo): Usage of statistics bounds
2025-08-22 12:58:52 +01:00
Leonid Fedorov
50c8e91ae6
chore(rbo, codemanagement) MCOL-6143: move rbo to separate dir
2025-08-21 17:01:32 +04:00