Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/docs/clickhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ Note: The example above is for Python using the [adbc-driver-manager](https://py

{{ footnotes|safe }}

[clickhouse]:
[clickhouse]: https://clickhouse.com/
10 changes: 5 additions & 5 deletions src/pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions src/validation/queries/type/literal/boolean.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2026 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Boolean"
4 changes: 4 additions & 0 deletions src/validation/queries/type/literal/date.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Date32"

// part: query

SELECT CAST('2023-05-15' AS Date32) AS res
17 changes: 17 additions & 0 deletions src/validation/queries/type/literal/decimal.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2026 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Decimal"
17 changes: 17 additions & 0 deletions src/validation/queries/type/literal/float32.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2026 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Float32"
17 changes: 17 additions & 0 deletions src/validation/queries/type/literal/float64.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2026 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Float64"
17 changes: 17 additions & 0 deletions src/validation/queries/type/literal/int16.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2026 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Int16"
17 changes: 17 additions & 0 deletions src/validation/queries/type/literal/int32.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2026 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Int32"
18 changes: 18 additions & 0 deletions src/validation/queries/type/literal/int64.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) 2026 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[tags]
sql-type-name = "Int64"
17 changes: 17 additions & 0 deletions src/validation/queries/type/literal/string.txtcase
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2026 ADBC Drivers Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "String"
1 change: 1 addition & 0 deletions src/validation/queries/type/literal/time.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ SELECT CAST('13:45:31' AS TIME) AS res

[tags]
broken-vendor = "ClickHouse Time type is not supported in Arrow format export"
sql-type-name = "Time"
1 change: 1 addition & 0 deletions src/validation/queries/type/literal/timestamp.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

[tags]
caveats = ["ClickHouse datetime without timezone is interpreted in **server** timezone"]
sql-type-name = "DateTime64 (no time zone)"

// part: query

Expand Down
5 changes: 5 additions & 0 deletions src/validation/queries/type/literal/timestamptz.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[tags]
sql-type-name = "DateTime64 (with time zone)"

// part: query

SELECT CAST('2023-05-15 13:45:30' AS DateTime64(6, 'UTC')) AS res
2 changes: 2 additions & 0 deletions src/validation/queries/type/select/binary.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

// part: metadata

hide = true

[tags]
broken-vendor = "ClickHouse has no dedicated bytestring type; it is the same as the string type, and by default all strings are treated as Arrow strings, meaning binary data in ClickHouse results in invalid string data in Arrow"

Expand Down
4 changes: 4 additions & 0 deletions src/validation/queries/type/select/boolean.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Boolean"

// part: setup_query

CREATE TABLE test_boolean (
Expand Down
3 changes: 2 additions & 1 deletion src/validation/queries/type/select/date.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// part: metadata

[tags]
caveats = ["ClickHouse Date32 has limited range (1900-01-01 to 2299-12-31)"]
caveats = ["Date32 has limited range (1900-01-01 to 2299-12-31)"]
sql-type-name = "Date32"

// part: setup_query

Expand Down
4 changes: 4 additions & 0 deletions src/validation/queries/type/select/decimal.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Decimal"

// part: setup_query

CREATE TABLE test_decimal (
Expand Down
4 changes: 4 additions & 0 deletions src/validation/queries/type/select/float32.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Float32"

// part: setup_query

CREATE TABLE test_float32 (
Expand Down
4 changes: 4 additions & 0 deletions src/validation/queries/type/select/float64.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Float64"

// part: setup_query

CREATE TABLE test_float64 (
Expand Down
4 changes: 4 additions & 0 deletions src/validation/queries/type/select/int16.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Int16"

// part: setup_query

CREATE TABLE test_int16 (
Expand Down
4 changes: 4 additions & 0 deletions src/validation/queries/type/select/int32.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata
[tags]
sql-type-name = "Int32"

// part: setup_query

CREATE TABLE test_int32 (
Expand Down
5 changes: 5 additions & 0 deletions src/validation/queries/type/select/int64.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// part: metadata

[tags]
sql-type-name = "Int64"

// part: setup_query

CREATE TABLE test_int64 (
Expand Down
3 changes: 1 addition & 2 deletions src/validation/queries/type/select/string.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
// limitations under the License.

// part: metadata

[tags]
caveats = ["Special characters like {} are not supported due to clickhouse crate parameter parsing"]
sql-type-name = "String"

// part: setup_query

Expand Down
1 change: 1 addition & 0 deletions src/validation/queries/type/select/time.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@

[tags]
broken-vendor = "ClickHouse Time type is not supported in Arrow format export"
sql-type-name = "Time"
3 changes: 2 additions & 1 deletion src/validation/queries/type/select/timestamp.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// part: metadata

[tags]
caveats = ["ClickHouse DateTime64(6) has limited range (1900 to 2299)"]
caveats = ["DateTime64 has limited range (1900 to 2299)"]
sql-type-name = "DateTime64 (no time zone)"

// part: setup_query

Expand Down
3 changes: 2 additions & 1 deletion src/validation/queries/type/select/timestamptz.txtcase
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// part: metadata

[tags]
caveats = ["ClickHouse DateTime64(6, 'UTC') has limited range (1900 to 2262)"]
caveats = ["DateTime64 has limited range (1900 to 2299)"]
sql-type-name = "DateTime64 (with time zone)"

// part: setup_query

Expand Down
1 change: 1 addition & 0 deletions src/validation/tests/clickhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ClickHouseQuirks(model.DriverQuirks):
short_version = "25.12"
features = model.DriverFeatures(
statement_bind=False,
statement_prepare=False,
current_catalog="",
current_schema="db",
supported_xdbc_fields=[],
Expand Down
Loading
Loading