Commit Graph

8 Commits

Author SHA1 Message Date
Azat Khuzhin
29a8a00656 Add ability to pass QueryKind via clickhouse-client/local (useful for debugging)
v2: fix LocalConnection::sendQuery() for Suggest (comes w/o client_info) [1]
    [1]: https://s3.amazonaws.com/clickhouse-test-reports/37290/7c85175963226ff78eec542efafcff4e650aa0f0/stateless_tests__ubsan__actions_.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-19 07:19:27 +03:00
Azat Khuzhin
fa657d1d7f bash-completion: add completion for send_logs_level
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-04-24 22:36:27 +03:00
Azat Khuzhin
18e8f0eb5e Add ability to push down LIMIT for distributed queries
This way the remote nodes will not need to send all the rows, so this
will decrease network io and also this will make queries w/
optimize_aggregation_in_order=1/LIMIT X and w/o ORDER BY faster since it
initiator will not need to read all the rows, only first X (but note
that for this you need to your data to be sharded correctly or you may
get inaccurate results).

Note, that having lots of processing stages will increase the complexity
of interpreter (it is already not that clean and simple right now).

Although using separate QueryProcessingStage looks pretty natural.

Another option is to make WithMergeableStateAfterAggregation always, but
in this case you will not be able to disable only this optimization,
i.e. if there will be some issue with it.

v2: fix OFFSET
v3: convert 01814_distributed_push_down_limit test to .sh and add retries
v4: add test with OFFSET
v5: add new query stage into the bash completion
v6/tests: use LIMIT O,L syntax over LIMIT L OFFSET O since it is broken in ANTLR parser
          https://clickhouse-test-reports.s3.yandex.net/23027/a18a06399b7aeacba7c50b5d1e981ada5df19745/functional_stateless_tests_(antlr_debug).html#fail1
v7/tests: set use_hedged_requests to 0, to avoid excessive log entries on retries
          https://clickhouse-test-reports.s3.yandex.net/23027/a18a06399b7aeacba7c50b5d1e981ada5df19745/functional_stateless_tests_flaky_check_(address).html#fail1
2021-06-09 02:29:50 +03:00
Azat Khuzhin
d18f6aa851 bash-completion: complete available formats for --format/--input-format/--output-format 2021-05-12 21:11:36 +03:00
Azat Khuzhin
1639cc598d bash-completion: add completion for --host 2021-05-04 22:23:08 +03:00
Azat Khuzhin
3e72d4186c bash-completion: add completion for --stage 2021-05-04 22:23:08 +03:00
Azat Khuzhin
61e4c5af07 bash-completion: make some code more generic 2021-05-04 22:23:08 +03:00
Azat Khuzhin
84280f1148 Add bash completion support for clickhouse utils 2021-03-19 21:33:01 +03:00