Repository navigation
[jdbc-v2] Add RANGES keyword and Obfuscate engine for ClickHouse HEAD - #3224
Merged
Merged
Conversation
ClickHouse 26.11 (HEAD) adds the `TIME RANGES` keyword and the `Obfuscate` table engine. The jdbc-v2 keyword and engine guard tests fail because `RANGES` is not in ALLOWED_KEYWORD_ALIASES and `Obfuscate` is not in ENGINE_TO_TABLE_TYPE. - Append `RANGES` to ALLOWED_KEYWORD_ALIASES. It is usable as an alias on the server (`SELECT 1 RANGES`). - Map `Obfuscate` to TABLE, the same as the other engines that only produce data (GenerateRandom, FuzzJSON, FuzzQuery). The engine only backs the `obfuscate` table function; the server rejects it in CREATE TABLE. Fixes: #3222 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Client V2 CoverageCoverage Report
Class Coverage
|
JDBC V2 CoverageCoverage Report
Class Coverage
|
|
JDBC V1 CoverageCoverage Report
Class Coverage
|
Client V1 CoverageCoverage Report
Class Coverage
|
chernser
approved these changes
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Fixes the jdbc-v2 tests that fail against ClickHouse HEAD (26.11.1.110).
Root cause: ClickHouse 26.11 adds the
TIME RANGESkeyword tosystem.keywordsand theObfuscateengine tosystem.table_engines. The two guard tests compare these server tables with the driver's lists:StatementSQLTest.testAllowedKeywordAliasesMatchSystemKeywordssplitsTIME RANGESinto words.TIMEis already inALLOWED_KEYWORD_ALIASES;RANGESis not.DatabaseMetaDataTest.testAllTableEnginesFromSystemTableEnginesAreMapped(andShowStatementDatabaseMetaDataTest, which inherits it) findsObfuscatemissing fromENGINE_TO_TABLE_TYPE.Changes (done as
.cursor/skills/update-keyword-engine-lists/SKILL.mddescribes):ClickHouseSqlUtils: appendRANGESin a new dated block. The server accepts it as an alias (SELECT 1 AS RANGESandSELECT 1 RANGESboth return1), so it goes inALLOWED_KEYWORD_ALIASES, notreserved_keywords.txt.DatabaseMetaDataImpl: mapObfuscatetoTABLEin a new dated group before// Special. The engine only backs theobfuscate(SELECT ...)table function. The server rejects it in DDL (CREATE TABLE ... ENGINE = Obfuscate→Specifying ENGINE is not allowed for an Obfuscate;CREATE TABLE t AS obfuscate(...)→Table function 'obfuscate' cannot be used to create a table).TABLEmatches the other engines that only produce data (GenerateRandom,FuzzJSON,FuzzQuery).history/latest/3222.md: changelog entry.Compatibility impact: none.
RANGESis not a token in the JavaCC or ANTLR grammar, so both parsers already accepted it as an alias.getTables()already reported unmapped engines asTABLEand included them in aTABLEfilter. No public API ordocs/features.mdchange.Closes #3222
Test
Verified in a
clickhouse/clickhouse-server:headcontainer (26.11.1.110), withTEST_CLICKHOUSE_CONTAINER=none:["RANGES"],[Obfuscate]).getTables*metadata tests also pass on both metadata paths (system.tablesandSHOW).testKeywordAliasesAsTableNamesalready parses every entry ofALLOWED_KEYWORD_ALIASESas an explicit and an implicit alias. It now coversRANGESon the JavaCC, ANTLR4 and ANTLR4-params parsers (1809 parser unit tests pass).mvn -pl jdbc-v2 verifyagainst HEAD: 1963/1963 unit tests and 770/773 integration tests pass. The 3 failures areConnectionTest.testSecureConnection/testSSLModeTrust/testSSLModeVerifyCa. They fail only because of our local setup: the test server listens for HTTP on 18123, so we setTEST_CLICKHOUSE_HTTP_PORT=18123, andClickHouseServerForTestalso uses that override for the HTTPS endpoint. The tests then send TLS to the plain-HTTP port (Unsupported or unrecognized SSL message). These tests do not use the changed code.No new test is added: the two existing guard tests are the regression tests for this change.
Checklist
history/latest/3222.md)Pre-PR validation:
mainagainst HEAD; passes every time with the fixAGENTS.md,docs/ai-review.mdand the repo'supdate-keyword-engine-listsprocedure🤖 Generated with Claude Code