Repository navigation
Conversation
|
Workflow [PR], commit [341425f] Summary: ✅
AI ReviewSummaryReviewed #117678 at Final VerdictStatus: ✅ Approve |
Use the same derived flag for `max_query_size` handling and dialect selection. Add regression coverage for an `ON CLUSTER` query initiated with the `clickhouse_json` dialect.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units74 translation units recompiled, 661 s compile time in total, 74 of them have a recent master baseline. |
…x-query-size # Conflicts: # src/Interpreters/executeQuery.cpp
…x-query-size # Conflicts: # src/Interpreters/executeQuery.cpp
Mirror the `ON CLUSTER` query-text filtering in `DatabaseReplicated` while keeping the caller AST unchanged. Cover `database` as an initiator-only carrier and preserve semantic settings. Rename all PR regression tests to the shared `05055_ddl_worker_` prefix while keeping the independent execution environments separate. Related: ClickHouse#117678 (comment)
Reject query-construction settings before `Replicated` and `ON CLUSTER` remove initiator-only settings from the queued query. This preserves the `NOT_IMPLEMENTED` check for direct, nested, `UNION`, and `DEFAULT` forms. Related: ClickHouse#117678 CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=117678&sha=d74be1d3183c2e7e8e774924e1a6cecabb3ead9b&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20s3%20storage%2C%20DBReplicated%2C%20parallel%2C%201%2F2%29
Strip all five `LogsQL` parser settings from the settings packet and query text. Use the common request-dialect guard when selecting the parser for server-generated queries. Extend the functional queue checks for both `ON CLUSTER` and `Replicated`. Related: ClickHouse#117678 Review: ClickHouse#117678 (comment)
Use `ClusterProxy::isInitiatorOnlySettingName` instead of a duplicate list to prevent divergence from query-text filtering. Add a functional test that sets `async_insert_select_as_async_insert` in the session, verifies its absence from the DDL settings packet, and preserves `join_use_nulls`. Related: ClickHouse#117678 Review: ClickHouse#117678 (comment)
Current master checks parser limits in `DDLTaskBase::parseQueryFromEntry`, so an over-deep DDL entry no longer reaches `executeQuery`. Keep the DDL limit assertion and use a secondary query to exercise its exception log fallback with an unlimited parse text size. Assert that the logged text is non-empty and bounded by the original `max_query_size`. Related: ClickHouse#117678
Keep `implicit_select` and `allow_settings_after_format_in_insert` in the queued query and settings packet because SQL functions parse string arguments during execution. Check their results for local, `ON CLUSTER`, and `Replicated` execution with query and session settings. Address review: ClickHouse#117678 (comment)
…x-query-size # Conflicts: # src/Interpreters/executeDDLQueryOnCluster.cpp
Group parser limits and exception logging in one test, and keep `ON CLUSTER` and `Replicated` database settings checks separate. Preserve query/session settings and SQL function execution scenarios. Validation: three functional tests passed through Praktika with zero skips; Bash syntax checks and ShellCheck passed.
Merge upstream `master` at 9a348d8. Include the fix that disables `use_columns_cache` in the text-index file-opening regression test. Preserve the existing `DDL` parser changes and their regression coverage. Related: ClickHouse#127781 Related: ClickHouse#117678
Include the CI log-cluster readiness fix from upstream. Related: ClickHouse#117678
Share `isInitiatorOnlyDDLSettingName` between query-text and settings-packet filtering so `parallel_replicas_for_object_storage_tables` remains available when a `DDL` worker initiates `CREATE ... AS SELECT`. Add a functional regression comparing stored values for local execution, `ON CLUSTER`, and a `Replicated` database with a session-only override. Related: ClickHouse#117678 Review: ClickHouse#117678 (comment)
Keep the canonical names alongside their aliases so both settings packets and SQL text are filtered. Exercise session aliases, explicit query settings and `DEFAULT` in the `ON CLUSTER` and `Replicated` queues. ClickHouse#117678 (comment)
Preserve unconditional settings capture from master and the parser-only and initiator-only filters in `DDLLogEntry::setSettingsIfRequired`.
Server-generated distributed
DDLqueries can become significantly larger than the original client query after server-side rewriting, for example when expanding SQL user-defined functions. TheDDLWorkerthen reparses the expanded query using the initiating session'smax_query_sizeand may reject it even though the original query was within the limit.Bypass
max_query_sizeand non-ClickHouse dialect selection when reparsing contexts marked withisDDLOrOnClusterInternal. Other parser-complexity and AST-size limits remain unchanged because they are separate safety controls. External queries remain subject tomax_query_size.Added functional coverage for:
ON CLUSTERquery;ON CLUSTERquery initiated with theclickhouse_jsondialect;max_query_sizefor oversized external queries.Related: #104881
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed
ON CLUSTERDDL queries failing withMax query size exceededwhen server-side rewriting, such as SQL user-defined function expansion, makes the queued query larger thanmax_query_size.Workflow [PR]
Sync PR [sync-upstream/pr/117678]