24 Commits
Author SHA1 Message Date
zooqueen 12ee47043b datastore: eliminate ALL clickhouse references from the product (no clickhouse, period)
Comprehensive removal across the compiled-product surface (src/programs/base/cmake/configs,
excl contrib third-party + unit tests): URLs clickhouse.com/.tech/.cloud -> hanzo.ai and
github.com/ClickHouse/ClickHouse -> github.com/hanzoai/datastore; fs/zk paths /var/lib/clickhouse
-> /var/lib/datastore, /clickhouse/tables -> /datastore/tables; SQL dict-source keyword
"clickhouse" -> "datastore" (SOURCE(DATASTORE(...)), forwards-only); .clickhouse.hash ELF section
-> .datastore.hash (main.cpp + CMake); hasClickhouse/Clickhouse symbols -> Datastore; all remaining
lowercase clickhouse -> datastore. 175 files. contrib/ (upstream deps) untouched. Build-verify since
this changes the SQL keyword, default paths and the binary-hash section.
2026-06-22 16:33:18 -07:00
zooqueen ca73c44faa datastore rebrand: final lowercase pass — quote-adjacent display strings + install defaults
The prior sweep kept " in the exclusion set to guard the SQL keyword "clickhouse", which
over-protected ALL quoted display strings ("clickhouse " << app in --help, install-tool defaults
like DEFAULT_..._SERVER_USER="clickhouse"/getpwnam("clickhouse")/binary-name fallbacks). Redid the
pass dropping " from the exclusion while still skipping the 4 SQL dict-source keyword lines, URLs,
and /clickhouse + .clickhouse.hash paths (kept . / - in the boundary). Renamed the 2 fuzzer files
clickhouse_fuzzer.cpp / clickhouse-template.g (not built; completeness).

Remaining lowercase clickhouse (526) = URLs, SQL SOURCE(CLICKHOUSE) keyword, and ZK/fs path
conventions (/var/lib/clickhouse, /clickhouse/tables) + internal .clickhouse.hash ELF section —
all protocol/external/convention, intentionally kept.
2026-06-22 00:21:07 -07:00
zooqueen f9f34ad947 datastore: rename program source/completion files clickhouse-* -> datastore-*
The lowercase sweep renamed source-file references inside programs/*/CMakeLists.txt
(clickhouse-su.cpp -> datastore-su.cpp etc.) but not the physical files -> 'Cannot find source
file datastore-su.cpp'. Renamed all 19 program entry-point sources, the client config xml, and
bash-completion scripts to match. Completes the program-file rebrand.
2026-06-21 23:57:41 -07:00
zooqueen 0357c7e3ff datastore rebrand: lowercase clickhouse -> datastore in commands/prose/help
Completes the user-facing branding: lowercase `clickhouse` command/symlink names
(clickhouse-server/-client/-local/...), `clickhouse <subcommand>` usage strings, and bare-word
prose in messages/comments -> datastore (~238 occurrences across 227 files).

Intentionally KEPT (not branding):
- SQL dict-source keyword "clickhouse" (SOURCE(CLICKHOUSE(...)) compat) - 4 sites
- external URLs (clickhouse.com / github.com/ClickHouse)
- filesystem / ZooKeeper path conventions (/var/lib/clickhouse fallback default, /clickhouse/tables/
  ReplicatedMergeTree ZK path) - deployment convention, overridden by our datastore-* config

String/comment-literal changes only; no identifiers touched (verified no bare lowercase clickhouse
C++ symbol exists). Build was already green; verifying this is still green.
2026-06-21 23:46:30 -07:00
zooqueen 06f45b6529 datastore rebrand: compound symbols + CMake targets/macros (clickhouse -> datastore)
The deep internal rebrand (user: "rename all compound symbols", "datastore_ good", "DB:: fine"):
- CamelCase symbols ClickHouse* -> Datastore* (358 distinct): mainEntryDatastoreServer,
  DatastoreDictionarySource, DatastoreRevision, DatastoreVersion, etc. URL/repo lines skipped.
- snake targets + macros clickhouse_* -> datastore_* (850 occ): datastore_common_io,
  datastore_add_executable, datastore_program_install, datastore_functions, etc. — uniform
  across src + cmake + all CMakeLists, and the contrib wrappers that link/use them
  (croaring, nuraft, corrosion, chdig, delta-kernel-rs, mongo-cxx).
- CLICKHOUSE_* macros -> DATASTORE_* (DATASTORE_OFFICIAL_BUILD, ENABLE_DATASTORE_*, etc.).
- project(ClickHouse) -> project(Datastore) so ${Datastore_SOURCE_DIR}/${Datastore_BINARY_DIR}
  (45 refs) resolve.

Replace (not drop) -> collision-free. DB:: namespace kept (per direction). lowercase SQL
`clickhouse` dictionary-source keyword + clickhouse.com / github.com/ClickHouse URLs kept.
NEEDS BUILD VERIFICATION on spark/CI — uniform + inspected-consistent but uncompiled here.
2026-06-21 20:38:05 -07:00
Azat Khuzhin 71710756b1 Support bash completion for chc/chl/ch/clickhouse client/clickhouse local 2025-12-02 16:27:25 +01:00
Azat Khuzhin 938dc7f20f Fix bash completion for non-client/local/benchmark 2025-06-08 22:37:00 +02:00
Azat Khuzhin 17c7fe883b Ignore "Invalid multibyte data detected" error during completion
Due to now the description of settings are also written.

Signed-off-by: Azat Khuzhin <[email protected]>
2024-10-06 21:45:12 +02:00
Azat Khuzhin 4c043301e6 Avoid ignoring errors of execute_process() (set COMMAND_ERROR_IS_FATAL=ANY)
This will fix with issues like this [1]:

    Aug 12 09:58:44 '/usr/bin/cmake' '--build' '/build/build_docker/native' '--target' 'pre_compressor'
    Aug 12 09:58:44 sccache: error: Server startup failed: cache storage failed to read: Unexpected (temporary) at stat
    Aug 12 09:58:45 ninja: build stopped: subcommand failed.
    Aug 12 09:58:45 -- Configuring done (77.7s)
    Aug 12 09:58:47 -- Generating done (1.8s)
    Aug 12 09:58:47 -- Build files have been written to: /build/build_docker

So as you can see even if ninja fails it still wrote build files, while
it should fail.

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/64955/0af41e32a5822d25ac3760f1ebb2313557474701/builds/report.html
  [2]: https://s3.amazonaws.com/clickhouse-builds/PRs/64955/0af41e32a5822d25ac3760f1ebb2313557474701/binary_darwin_aarch64/build_log.log

Note, COMMAND_ERROR_IS_FATAL is 3.19+, and the requirement for now is
3.20

Signed-off-by: Azat Khuzhin <[email protected]>
2024-08-13 10:35:54 +02:00
Azat Khuzhin 066475920e Fix bash completion for settings
Signed-off-by: Azat Khuzhin <[email protected]>
2024-05-28 18:02:29 +02:00
Azat Khuzhin 5caa89a2b3 Fix completion of available ClickHouse tools
Now clickhouse --help/ch --help will print --help for clickhouse-local,
let's use just "clickhouse help" to get help with list of available
tools in clickhouse binary itself.

Signed-off-by: Azat Khuzhin <[email protected]>
2024-04-09 15:37:56 +02:00
Azat Khuzhin 9c8b5edc33 Add bash completion for ch/chl/chc
Signed-off-by: Azat Khuzhin <[email protected]>
2023-12-29 12:38:52 +01:00
Azat Khuzhin caec685a49 Update formats list
Signed-off-by: Azat Khuzhin <[email protected]>
2023-10-26 17:35:22 +02:00
Azat Khuzhin 4cb8b186e7 Add more delimiters for completion
Signed-off-by: Azat Khuzhin <[email protected]>
2023-10-26 17:35:22 +02:00
Azat Khuzhin b6435b32f0 Fix bash completion for mawk
$ strings < /usr/bin/awk | grep awk
mawk 1.3%s%s %s, Copyright (C) Michael D. Brennan

$ awk '{print substr($0, 0, 1)}' <<<foo # returns empty string

$ awk '{print substr($0, 1, 1)}' <<<foo # returns empty string
f

$ awk -V | head -1
GNU Awk 5.2.2, API 3.2, PMA Avon 8-g1, (GNU MPFR 4.2.1, GNU MP 6.3.0)

$ awk '{print substr($0, 0, 1)}' <<<foo
f
$ awk '{print substr($0, 1, 1)}' <<<foo
f

Signed-off-by: Azat Khuzhin <[email protected]>
2023-10-26 17:35:22 +02:00
Azat Khuzhin 29877d3992 Update available formats for bash completion
Signed-off-by: Azat Khuzhin <[email protected]>
2022-08-28 17:22:32 +02:00
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 <[email protected]>
2022-05-19 07:19:27 +03:00
Azat Khuzhin fa657d1d7f bash-completion: add completion for send_logs_level
Signed-off-by: Azat Khuzhin <[email protected]>
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