Commit Graph
56 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 8ca48ae27a docs: stop teaching minioadmin, and say what S3 we actually run
The S3 engine and table-function docs handed readers `'minioadmin',
'minioadminpassword'` five times as the way to authenticate, plus the
integration fixture's own `ClickHouse_Minio_P@ssw0rd` in the s3Cluster
examples. Copy-pasteable weak credentials in the reference docs are a worse
problem than the branding: they get pasted. Those are placeholders now, and the
endpoints point at Hanzo S3 (`hanzoai/s3` — SeaweedFS-derived, Apache-2.0, and
never a MinIO fork).

`registerStorageObjectStorage.cpp` also linked a docker-compose recipe at
github.com/Datastore/examples, a URL the ClickHouse->Datastore rebrand invented
and that has never resolved. The sentence no longer depends on it.

Scope is deliberately docs only, both copies of them: `docs/en/**` — the one
doc tree `docs/AGENTS.md` says to edit — and the `src/**` `R"DOCS_MD(...)"`
blocks that mirror it into the binary. Every changed line in a .cpp is inside a
documentation raw-string (verified by delimiter-span check, 21/21); the only
header change is a `///` comment. No executable code, no test, no fixture, no
build config.

The integration-test harness keeps MinIO on purpose, and LLM.md now records
why so this is not re-litigated or sed'd: `minio==7.2.20` is a real dependency
behind `from minio import Minio` in helpers/cluster.py, 60 test files call 16
distinct client methods, 136 tests pass with_minio=True, ~120 storage XMLs
hardcode the fixture credential, and the compose file leans on MinIO-only
surface (--certs-dir TLS, prometheus auth mode, console address, virtual-host
bucket aliases) fronted by a registry-pulled clickhouse/s3-proxy image. That
port is a real project whose acceptance test is the S3 suite going green, and
it cannot be run here: ghcr.io/hanzoai/s3 is linux/amd64 only and this is
arm64.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-03 10:09:55 -07:00
Alexey MilovidovandClaude Opus 4.8 7852a9e2ef Autogenerate table-function reference pages from structured docs
Move the full page body of each table-function reference page into the
FunctionDocumentation attached at registerFunction time, and convert the
pages to be regenerated from system.table_functions (like table engines,
data types and formats already are).

55 of the 58 table-function pages are now autogenerated. The description of
each function is set to its reference-page body, resolved to the correct
registerFunction<Class>({...}) site by the function name (Class::name),
including the object-storage family (s3/gcs/azureBlobStorage/hdfs/iceberg/
deltaLake/hudi/paimon and their *Cluster variants, via Definitions) and the
templated/conditional-name functions (values, zeros, generateSeries). The
string-name overload functions (remote, cluster) and the doc-variable form
(format) are handled at their own sites. A page->name alias maps the
generate() page to the generateRandom function.

timeSeriesData is intentionally left hand-written: it is a registerAlias of
timeSeriesSamples, so the two share a single description, but their pages
differ (each uses its own name in examples) and an alias cannot carry its
own doc.

Verified against a from-master build: every function's
system.table_functions.description matches its master page body
byte-for-byte, and each regenerated page equals origin/master (body
identical, only the AUTOGENERATED markers added) with zero broken links.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-13 00:17:48 +00:00
Groene AIandClaude Opus 4.8 2975b8899d Make object storage cluster functions reject nesting like url and file
An explicit object storage cluster function (s3Cluster, azureBlobStorageCluster,
hdfsCluster, ...) nested inside an outer distributed query did not reach the
nested-cluster-function gate: on the secondary query it gated distributed reads
on collaborate_with_initiator, which is false under clusterAllReplicas, so it
silently read the whole object on every outer replica and multiplied the row
count instead of being rejected. urlCluster and fileCluster always request a
distributed read on a secondary query and are correctly rejected.

Make the object storage cluster functions request a distributed read on a
secondary query too, so they reach RemoteQueryExecutor::processReadTaskRequest
and the initiator decides uniformly for every *Cluster function: it serves the
read task when it installed an iterator (the legitimate top-level and
INSERT INTO distributed SELECT FROM *Cluster dispatch) and rejects it with
BAD_ARGUMENTS otherwise (the nested shapes). This supersedes the earlier
defensive gate that avoided the LOGICAL_ERROR by skipping distributed reads,
now that the gate raises a normal query error instead of aborting.

03850 now also covers nested clusterAllReplicas(..., s3Cluster(...)).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-17 12:36:47 +00:00
Alexey MilovidovandClaude Opus 4.6 8b47d200d5 Enable -Wmissing-prototypes compiler warning
Add `static` to file-local functions and forward declarations
for cross-TU functions to satisfy `-Wmissing-prototypes`.

This ensures all functions have visible prototypes before their
definitions, improving code quality and catching accidental
linkage issues.

Reference: https://github.com/ClickHouse/ClickHouse/issues/76944

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-27 20:11:07 +00:00
Raúl MarínandClaude Opus 4.6 6aa187da03 Reduce CurrentThread.h include fan-out to cut compilation cascade
- Remove `CurrentThread.h` from high-fan-out headers: `ProcessList.h`,
  `IQueryPlanStep.h`, `DDLWorker.h`, `TCPHandler.h`, `AggregatingTransform.h`,
  `ParallelParsingInputFormat.h`, `StorageTableFunction.h`, `parseSyslogLevel.h`,
  `EmbeddedRocksDBBulkSink.h`, `BlockIO.h`, `LocalConnection.h`,
  `StorageMaterializedView.h`, `HTTPHandler.h`
- Extract `QueryScope` from `CurrentThread` into standalone `Common/QueryScope.h`
  with its own `.cpp`, replacing the nested `CurrentThread::QueryScope` class
- Extract `getCurrentThreadGroup` free function into `Common/ThreadGroupSwitcher.h`,
  replacing `CurrentThread::getGroup()` in template headers:
  `threadPoolCallbackRunner.h`, `ParallelFormattingOutputFormat.h`,
  `HashedDictionaryParallelLoader.h`, `UniqExactSet.h`, `HashedDictionary.h`,
  `StatusRequestsPool.h`
- De-inline `MemoryTrackerSwitcher` ctor/dtor into `MemoryTrackerSwitcher.cpp`
- De-inline `ResourceGuard::Request::wait` into `ResourceGuard.cpp`
- De-inline `ManyAggregatedData` destructor into `AggregatingTransform.cpp`
- De-inline `QueryStatus::updateProgressIn/Out` into `ProcessList.cpp`
- Add explicit `CurrentThread.h` includes to `.cpp` files that relied on
  transitive includes through the trimmed headers

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-12 14:54:34 +01:00
Robert Schulze f5596c4405 New table functions must now provide function docs 2026-03-02 08:54:42 +00:00
Alexey MilovidovandClaude Opus 4.6 f9ec529e4f Fix MSan integration test failures: guard deltaLakeAzureCluster with USE_DELTA_KERNEL_RS and skip flaky tests
The `deltaLakeAzureCluster` table function was registered under `#if USE_AZURE_BLOB_STORAGE`
but the corresponding `DeltaLakeAzure` storage engine requires `USE_DELTA_KERNEL_RS`. This
mismatch caused a `LOGICAL_ERROR` exception when the table function tried to look up its
engine for access checking, crashing the server in debug builds.

Fixes:
- Add `USE_DELTA_KERNEL_RS` guard to `deltaLakeAzureCluster` registration (.cpp, .h, template)
- Change `getSourceAccessObject` from `LOGICAL_ERROR` to `UNKNOWN_STORAGE` for unknown engines
- Fix copy-paste in documentation: "Iceberg" → "DeltaLake" for `deltaLakeAzureCluster`
- Skip Delta Lake tests when `DeltaLake` engine is not available (query `system.table_engines`)
- Conditionally handle Delta Lake entries in `test_mask_sensitive_info` based on engine availability
- Skip timing-sensitive and memory-measurement tests under MSan:
  `test_ttl_compatibility`, `test_memory_limit_success`, `test_async_query_sending`,
  `test_when_s3_timeout_at_listing`

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-16 07:05:21 +01:00
Anton Ivashkin 656741ca70 icebergLocalCluster table function 2026-01-02 15:29:30 +01:00
Konstantin Vedernikov c05b094e53 start 2025-11-21 08:09:30 +00:00
“JiaQi eded9bd48c Merge branch 'master' into paimon-support 2025-09-25 22:19:09 +08:00
“JiaQi 544768750c fix build 2025-09-23 15:53:14 +08:00
kssenii a3d78c23e9 Change datalake_disk_name to disk 2025-09-22 11:33:36 +02:00
Smita Kulkarni ee486bf08b Merge branch 'master' into Add_cluster_to_DeltaLake_variants 2025-09-14 22:01:46 +02:00
Smita KulkarniandGitHub b985e24533 Merge branch 'master' into Add_cluster_to_DeltaLake_variants 2025-09-12 22:05:39 +02:00
scanhex12andGitHub b1e70d5dcf Revert "Revert "Iceberg + delta lake local and s3 disks"" 2025-09-12 19:53:27 +02:00
Alexander TokmakovandGitHub 928ad2dca6 Revert "Iceberg + delta lake local and s3 disks" 2025-09-12 18:00:58 +02:00
Smita Kulkarni de53ede9b8 Fix style check 2025-09-12 17:19:43 +02:00
Smita Kulkarni bb4036e704 Merge branch 'master' into Add_cluster_to_DeltaLake_variants 2025-09-12 17:13:17 +02:00
Smita KulkarniandGitHub dc56df3603 Update registerTableFunctionDeltaLakeCluster to include unused 2025-09-12 16:11:58 +02:00
Konstantin Vedernikov 668a30564a fix 2025-09-10 16:35:04 +00:00
Smita KulkarniandGitHub 731441ba1f Fix function name 2025-09-10 10:43:11 +02:00
Konstantin Vedernikov c719ef0917 support delta lake 2025-09-09 00:27:33 +00:00
Konstantin Vedernikov 2969e79448 fix review 2025-09-08 16:05:45 +00:00
Konstantin Vedernikov 22fc4a67f6 fixups 2025-09-08 11:40:43 +00:00
Konstantin Bogdanov 878d3dd328 Check for presence of cluster read task callback 2025-08-19 21:04:50 +02:00
Smita Kulkarni 8e0765a014 Add deltaLakeCluster variant functions 2025-08-13 15:30:43 +02:00
Nikita Mikhaylov 91e89a1f65 Initial 2025-08-02 19:46:15 +02:00
Konstantin VedernikovandGitHub 3c3181681f Merge branch 'master' into glue_writes 2025-07-28 20:00:21 +02:00
Konstantin Vedernikov b79e065863 fix tests & cosmetics 2025-07-28 11:01:46 +00:00
Arthur Passos 210f319d14 Merge branch 'master' into s3_hive_style_partitioned_writes 2025-07-25 08:15:10 -03:00
Konstantin VedernikovandGitHub b3f7ac329a Merge branch 'master' into glue_writes 2025-07-24 22:24:43 +02:00
Konstantin Vedernikov 35549cf4ed fix tests 2025-07-22 12:26:33 +00:00
Konstantin Vedernikov b112326453 fix 2025-07-21 19:24:32 +00:00
Konstantin Vedernikov 8744ceb4de start 2025-07-21 12:21:40 +00:00
Arthur PassosandGitHub 71ba375957 Merge branch 'master' into s3_hive_style_partitioned_writes 2025-07-10 09:34:17 -03:00
Kseniia SumarokovaandGitHub 17b17d86b7 Update src/TableFunctions/TableFunctionObjectStorageCluster.cpp 2025-07-02 14:09:47 +02:00
yangjiang 96edba446c Make SECONDARY_QUERY lazy init StorageObjectStorage 2025-07-02 15:37:23 +08:00
Arthur Passos 862bdc747c resolve one more todo 2025-06-17 10:13:23 -03:00
kssenii 983750031d Fix potential segfault in DataLakeConfiguration when using Cluster function with old analyzer; remove duplicating data lake metadata updates (extra object storage requests); fix redundant listing in object storage when format is not explicitly specified (which was already done for non-cluster data lake engines) 2025-06-04 15:34:09 +02:00
kssenii c8cd0a61e8 Decouple ObjectStorageSettings and DeltaLakeStorageSettings 2025-05-23 18:35:32 +02:00
Shaun Struwig 4af0102403 update categories 2025-04-22 18:15:55 +02:00
Raúl Marín e59257292e Temp: Disable delta kernel in some builds 2025-02-10 17:52:48 +01:00
Robert Schulze 2338547c90 categories --> category 2024-12-30 17:44:20 +00:00
Mikhail Artemenko 99177c0daf remove icebergCluster alias 2024-11-20 11:15:12 +00:00
Mikhail Artemenko 6894e280b2 fix pr issues 2024-11-19 12:34:42 +00:00
Mikhail Artemenko d2efae7511 enable cluster versions for datalake storages 2024-11-18 17:35:21 +00:00
divanik af7aa7de56 Fix some bugs 2024-10-29 10:03:02 +00:00
kssenii 434d2d16f1 Cleanuo 2024-04-26 19:23:33 +02:00
kssenii 399414bb40 Better 2024-04-20 22:56:29 +01:00
kssenii b24a2afd5f A few more test fixes 2024-04-04 13:21:22 +02:00