Commit Graph

126 Commits

Author SHA1 Message Date
vdimir
46187a73ee wip 2021-09-28 14:11:31 +03:00
Ilya Golshtein
3766d47f31 ORs in JOINs 2021-09-28 14:11:28 +03:00
Anton Popov
1c80a95b36 slightly better code near reading of subcolumns 2021-09-18 22:34:54 +03:00
vdimir
c4ffc2879f
Perform join type inference for USING at ExpressionAnalyzer instead of TreeRewriter 2021-09-01 15:05:47 +03:00
Nikolai Kochetov
3e44ef437e
Merge pull request #26639 from ClickHouse/fix-bad-cast
Fix bad cast
2021-08-19 11:17:26 +03:00
Pavel Kruglov
7c98fc11b9 Fix performance, make only one setting 2021-08-16 14:30:56 +03:00
Pavel Kruglov
36bea6abb4 Add setting optimize_short_circuit_function_evaluation 2021-08-13 14:48:32 +03:00
Pavel Kruglov
fc59c98676 Clean up 2021-08-13 11:18:34 +03:00
mergify[bot]
80eaea1c51
Merge branch 'master' into short-circuit 2021-08-12 08:38:45 +00:00
Pavel Kruglov
eac2dc52a1 Fix style 2021-08-12 11:31:28 +03:00
Pavel Kruglov
320b3c474c Remove extra include 2021-08-11 19:07:59 +03:00
Pavel Kruglov
bba67a8b87 Remove extra line 2021-08-11 18:59:13 +03:00
Pavel Kruglov
95d52b9e5f Refactor 2.0 2021-08-11 18:56:03 +03:00
Alexey Milovidov
c590a239d5 Merge branch 'master' into fix-bad-cast 2021-08-11 05:48:37 +03:00
Pavel Kruglov
b841a96c39 Refactor code 2021-08-10 14:31:15 +03:00
Pavel Kruglov
70b51133c1 Try to simplify code 2021-08-09 18:01:08 +03:00
Pavel Kruglov
9fd4d14521 Fix style, build, add test 2021-08-09 17:57:50 +03:00
Pavel Kruglov
76b3ae4301 Fix tests 2021-08-09 17:57:49 +03:00
Pavel Kruglov
3ec2ab6156 Avoid using expand, fix bugs, add tests and comments 2021-08-09 17:54:49 +03:00
Pavel Kruglov
62d4f4b25c Small refactoring and adding comments 2021-08-09 17:54:14 +03:00
Pavel Kruglov
0662df8b76 Fix performance with JIT, add arguments to function isSuitableForShortCircuitArgumentsExecution 2021-08-09 17:54:14 +03:00
Pavel Kruglov
cdbe4951f4 Add some optimizations and fixes 2021-08-09 17:50:09 +03:00
Pavel Kruglov
74a8b14ca4 Fix tests 2021-08-09 17:44:39 +03:00
Pavel Kruglov
b6061e132a Small fixes 2021-08-09 17:44:39 +03:00
Pavel Kruglov
400cad4d8b Refactor, fix bugs, improve performance 2021-08-09 17:44:04 +03:00
Pavel Kruglov
bd415b17d2 Fix bug 2021-08-09 17:43:10 +03:00
Pavel Kruglov
ae8df9c1c5 Add reverse parameter to filter, fix tests, reduce coping 2021-08-09 17:43:10 +03:00
Pavel Kruglov
775d190fb3 Fix tests 2021-08-09 17:43:10 +03:00
Pavel Kruglov
50d4192126 Implement short circuit function evaluation, first attempt 2021-08-09 17:43:10 +03:00
Nikolai Kochetov
40e9f9d88e Fix spellign. 2021-08-09 16:47:30 +03:00
Nikolai Kochetov
57e5407fd8 Fix test from fuzzer. 2021-08-09 15:19:28 +03:00
vdimir
a0ed37e04e
Ignore constness in ExpressionActionsChain::JoinStep
Fix 01064_pm_all_join_const_and_nullable with bad cast check
2021-07-28 16:35:02 +03:00
Vladimir
576b407804
Support conditions in JOIN ON section (#24420)
* Try to enforce table identification in CollectJoinOnKeysMatcher

* Support filtering conditions in JOIN ON for HashJoin

* Correct handle non equi join

* Update test 00878_join_unexpected_results

* Join on filters calculated as one row before join

* Do not lookup key in hash join if condition for row is not hold

* better

* Support filtering conditions in JOIN ON for MergeJoin

* Support Nullable mask in JOIN ON section

* Fix style in Interpreters/TableJoin.cpp

* Change return type of getColumnAsMask in join_common to ColumnPtr

* Handle Nullable(Nothing) type in JOIN ON section, add test cases

* Fix type cast JoinCommon::getColumnAsMask

* Check type if conditions in JOIN ON section, support functions

* Update tests with JOIN ON

* Style changes, add comments for conditions in JOIN ON section

* Add test cases for join on condtions

* JOIN ON key1 = key2 AND (cond1 OR cond2)

* Remove CollectJoinOnKeysVisitor has_join_keys

* Add test cases for join on nullable/lc conditions

* Fix style

* Change error code 48 to 403 in join on tests

* Fix whitespace
2021-07-21 20:03:33 +03:00
Alexey Milovidov
d848e5495c Better implementation 2021-07-12 09:36:46 +03:00
Alexey Milovidov
ff5c433f10 Check for non-deterministic functions in keys, including constant expressions 2021-07-12 08:58:19 +03:00
Maksim Kita
c50909468f Updated ExpressionActionSettings 2021-05-19 17:32:07 +03:00
Maksim Kita
9699299083 Fix build 2021-05-19 16:11:38 +03:00
Maksim Kita
150a88d647 ExpressionActions compile only necessary places 2021-05-19 11:43:16 +03:00
Nikolai Kochetov
c508868570
Merge pull request #23082 from ClickHouse/explain-output
JSON output for EXPLAIN
2021-04-28 15:39:06 +03:00
Alexander Kuzmenkov
06ca44a378 fix pvs warnings 2021-04-22 22:54:58 +03:00
Nikolai Kochetov
9b86c19836 Use JSONBuilder for explain json result. 2021-04-14 17:07:56 +03:00
Nikolai Kochetov
48bcd5b490 Add tree conversion for expression. 2021-04-09 19:18:45 +03:00
Azat Khuzhin
42d858b7e5 Fix LOGICAL_ERROR for Log with nested types w/o columns in the SELECT clause
Found with fuzzer [1]:

<details>

    2021.04.04 10:25:46.762596 [ 135 ] {4b6b5de3-d242-4267-910a-76b235467356} <Fatal> : Logical error: 'Logical error: no information about file column%2Ename.size0 in StorageLog'.
    ...
    2021.04.04 10:25:46.763563 [ 44 ] {} <Trace> BaseDaemon: Received signal 6
    2021.04.04 10:25:46.765884 [ 165 ] {} <Fatal> BaseDaemon: 5. abort @ 0x25859 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
    2021.04.04 10:25:46.901540 [ 165 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:51: DB::handle_error_code() @ 0x11cc4f16 in /workspace/clickhouse
    2021.04.04 10:25:47.030755 [ 165 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Common/Exception.cpp:58: DB::Exception::Exception() @ 0x11cc5025 in /workspace/clickhouse
    2021.04.04 10:25:47.617201 [ 165 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Storages/StorageLog.cpp:183: DB::LogSource::readData()

</details>

  [1]: https://clickhouse-test-reports.s3.yandex.net/22583/69296876005c0fa171c755f8b224e4d58192c402/fuzzer_debug/report.html#fail1

The problem here is that there is no column%2Ename.size0 there is
column.size0 instead, and it seems that reading sizeX file is not enough
in other places, so just filter them out in
ExpressionActions::getSmallestColumn() (fallback method for storages w/o
getColumnSizes() implemented)
2021-04-05 08:48:04 +03:00
Nikolai Kochetov
c3c393a7aa Merge branch 'master' into refactor-actions-dag 2021-03-18 14:33:07 +03:00
Nikolai Kochetov
5ef5ec4e05 Fix build. 2021-03-10 13:48:08 +03:00
Nikolai Kochetov
4f133ae036 Merge branch 'master' into refactor-actions-dag 2021-03-10 12:40:55 +03:00
Nikolai Kochetov
5ef9d87790 Fix some other tests. 2021-03-10 11:41:24 +03:00
Nikolai Kochetov
fc415952ce Try fix test. 2021-03-05 16:56:44 +03:00
Nikolai Kochetov
c481401b0b Fix build. 2021-03-05 12:54:17 +03:00
Nikolai Kochetov
9a39459888 Refactor ActionsDAG 2021-03-04 20:38:12 +03:00