Commit Graph

5 Commits

Author SHA1 Message Date
Azat Khuzhin
0324770773 Remove all trailing whitespaces in tests
sed -r -i \
    -e 's/SELECT $/SELECT/' \
    -e 's/SELECT DISTINCT $/SELECT DISTINCT/' \
    -e 's/WITH $/WITH/' \ # zero matches, new test will be added
    -e 's/ARRAY JOIN $/ARRAY JOIN/' \
    -e 's/GROUP BY $/GROUP BY/' \
    -e 's/ORDER BY $/ORDER BY/' \
    -e 's/LIMIT ([0-9]+) BY $/LIMIT \1 BY/' \ # zero matches, new test will be added
    tests/queries/*/*.sql \
    tests/queries/*/*.reference

(With except for tests/queries/0_stateless/00751_default_databasename_for_view.reference)
2020-09-09 01:36:58 +03:00
Azat Khuzhin
17b27b6c28 Do not optimize any(arrayJoin()) -> arrayJoin() under optimize_move_functions_out_of_any
Otherwise the following query will be optimized incorrectly:

    SELECT
        *,
        any(arrayJoin([[], []]))
    FROM numbers(1)
    GROUP BY number

And the result will be:

    ┌─number─┬─arrayJoin(array(array(), array()))─┐
    │      0 │ []                                 │
    │      0 │ []                                 │
    └────────┴────────────────────────────────────┘

While should be:

    ┌─number─┬─any(arrayJoin(array(array(), array())))─┐
    │      0 │ []                                      │
    └────────┴─────────────────────────────────────────┘
2020-08-13 22:17:49 +03:00
Artem Zuikov
2041d7d0d8
Fix move_functions_out_of_any optimisation with lambda (#12664) 2020-07-23 18:15:22 +03:00
Nikolai Kochetov
e1481ccfc2 Add initial explain. 2020-06-27 12:30:38 +03:00
Anton Popov
bd28b7e1c2 better code 2020-06-18 20:05:26 +03:00