Repository navigation
dialect(clickhouse): version checks and fixes, tested on ClickHouse in Docker - #102
Merged
Merged
Conversation
…n Docker
Checked on clickhouse/clickhouse-server 21.3 to 26.6 in Docker; images
before 21.3 are published only as yandex/clickhouse-server and are not
used.
DdlGenerator (dialect api):
- supportsMaterializedViews: a refreshable ClickHouse materialized view
(24.10) keeps the result of its query; the classic one does not
ClickHouseDialect:
- generateListAgg: arrayStringConcat over the group's rows, sorted per
key, stable, DESC and NULLS FIRST/LAST kept, DISTINCT, any separator;
groupArrayArray, written before, takes arrays only and failed with
Code 43 on every version
- generateNthValueAgg, supportsNthValue, supportsNthValueIgnoreNulls:
the n-th of the group's sorted rows, NULL past the end; were refused
- generatePercentileDisc/Cont, supportsPercentileDisc/Cont: computed on
the sorted group; no quantile gives the discrete one, and 21.x's
quantileExactInclusive gives the 2nd value for p = 1
- paginationGenerator: LIMIT n OFFSET m; OFFSET ... FETCH failed
without ORDER BY on every version (Code 628), FETCH alone on 21.x
- castGenerator: ClickHouse type names; supportsTryCast, tryCast as
accurateCastOrNull, a boolean before 24.3 as true/false/1/0, else
NULL (22.x and 23.x threw on what is no boolean)
- allowsRegularExpressionInWhereClause, generateRegularExpression:
match(s, '(?-s)\A(?:...)\z') on RE2; none for lookaround, back
references, possessive, class intersection, which RE2 refuses or
reads otherwise; Java's u flag taken out
- supportsGroupingSets: from 22.9; 22.6 leaves the rows unsorted,
22.6 to 22.8 give GROUPING() the other way round
- cteGenerator: RECURSIVE from 24.4, on the new analyzer only
- supportsRenameColumn: from 20.4
- supportsUsers, supportsRoles: from 20.4; createUser gives no user
where supportsUsers says no
- commentOnTable: MODIFY COMMENT from 21.11; supportsCommentOnView,
a view's comment and its columns' from 22.1, 21.11 and 21.12 write
metadata they cannot read again and the server does not start
- supportsAtomicMultiRenameTable: false, RENAME TABLE a TO b, c TO d
undoes nothing when a later rename fails; renameTables writes one
statement per rename
- supportsCreateOrReplaceView: stays false, documented: ClickHouse's
OR REPLACE replaces a table too, its rows gone
- supportsMaterializedViews: from 24.10, REFRESH AFTER 10 YEAR, a
refresh on demand in effect; dropped with DROP VIEW
- unionDistinctKeyword: UNION DISTINCT from 21.1, documented
Container tests, the dialect built from a live connection:
- ClickHouseContainers: the image of a tag, the driver's V1 before
21.11, which sends no async_insert
- ClickHouseListAggTest, ClickHouseNthValueTest,
ClickHousePercentileTest, ClickHouseOffsetTest, ClickHouseTryCastTest,
ClickHouseRegularExpressionTest (rows as Java's Pattern.matches),
ClickHouseGroupingSetsTest, ClickHouseRecursiveCteTest,
ClickHouseUnionDistinctTest, ClickHouseRenameColumnTest,
ClickHouseUsersTest, ClickHouseRolesTest, ClickHouseCommentOnTableTest,
ClickHouseCommentOnColumnTest, ClickHouseAtomicMultiRenameTableTest,
ClickHouseCreateOrReplaceViewTest, ClickHouseMaterializedViewTest
- ClickHouseDialectTest, ClickHouseAlterRenameOfflineTest,
ViewCommentStatementsTest, MaterializedViewStatementsTest: the new
statements and flags
Signed-off-by: <bulahovdenis@gmail.com>
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.
What does this PR do?
Checked on clickhouse/clickhouse-server 21.3 to 26.6 in Docker; images
before 21.3 are published only as yandex/clickhouse-server and are not
used.
DdlGenerator (dialect api):
ClickHouseDialect:
Container tests, the dialect built from a live connection: