Repository navigation
Mark support for KQL and PRQL as experimental - #74224
Conversation
|
This is an automated comment for commit 29d71c5 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
f5e6200 to
29d71c5
Compare
|
Hi @rschu1ze @yakov-olkhovskiy — this PR appears to contain a backward incompatible change but is categorized as Why: SettingsChangesHistory.cpp line 568-569 shows old_value=true, new_value=false for both settings. Users who were using KQL or PRQL dialects before version 25.1 will find their queries fail with SUPPORT_IS_DISABLED after upgrading, unless they explicitly set the experimental flags. This is a clear behavioral change that breaks existing workflows. Suggested category: Could you check if the changelog category should be updated? This helps users know what to expect when upgrading. Ignore this if the change is intentionally non-breaking. |
|
@clickgapai 25.1 is no longer officially supported, such subtleties don't matter anymore. |
The dialect was contributed in 2022 and abandoned by its authors; the rewrite they promised in ClickHouse#62668 was closed unmerged. Since then it has been emergency-disabled once (ClickHouse#59305) and gated behind `allow_experimental_kusto_dialect` (ClickHouse#74224), and issue ClickHouse#61742 ("Remove KQL support if this code will not be fixed") has stayed open. The implementation translated a KQL token stream directly into ClickHouse SQL *text* and re-parsed it. Everything below follows from that: - KQL string literals were spliced into generated SQL unescaped, so `T | where s contains "x') OR 1 = 1 OR ilike(s, 'y"` injected arbitrary expressions -- and `contains '50%'` matched `'50x'` because LIKE metacharacters passed through. - No types were available while translating, so 14 sites emitted runtime `toTypeName()` dispatch and datetimes were modelled as strings truncated to 27 characters. - Arguments were SQL text, so a dozen sites called `std::stoi` on it; `format_timespan(col, 'hh:mm')` failed with "stoi: no conversion". - 28 of the 237 registered functions were stubs that returned the raw KQL name into the generated SQL, including every `series_*`. - `let` bindings lived in a `static thread_local` map that, by its own comment, leaked between unrelated queries. This commit removes the implementation and every trace of it: the parser, the `kusto` dialect and its experimental setting, the `kusto` value of `interval_output_format` and the interval serialization it drove, the client/server call sites, the fuzzer and style-check carve-outs, and the tests. A correct implementation is added next. Two notes on what was deliberately kept. `ASTSelectQuery::normalize ChildrenOrder` stays -- several other parsers use it -- with its comment generalized. `04305_parser_error_message_oob_101143.sh` stays as a regression test for the error-formatter buffer overflow; its rationale is rewritten, since the parser it originally exercised is now gone. Release history in CHANGELOG.md, docs/changelogs/ and SettingsChangesHistory.cpp is left untouched.
ClickHouse supports PRQL and Kusto Query Language (KQL) as alternative query languages but they each have their own problems:
The docs also recognize these issues.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Support for the alternative query languages PRQL and KQL was marked experimental. To use them, specify settings
allow_experimental_prql_dialect = 1andallow_experimental_kusto_dialect = 1.