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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@

### Bug Fixes

- **[client-v1]** Fixed the `DateTime64` case of `testReadWriteSimpleTypes` failing against ClickHouse 26.8. From 26.8
an unquoted number written to a `DateTime64` column in the `Values`/`Quoted` and `JSON` paths is a Unix timestamp in
seconds instead of the raw scaled value - the server setting `input_format_read_datetime_number_as_raw_value`
changed its default from `1` to `0` - so the `insert into ... values(1)` of the test stored `1970-01-01 00:00:01`
instead of the expected `1970-01-01 00:00:00.001`. The test now writes a quoted date-time literal for `DateTime64`,
as it already does for `FixedString` and `UUID`, so the written value means the same on every server version and the
sub-second round-trip stays covered. No client code is affected: both clients quote a date-time value in a text
statement or send it in `RowBinary`. (https://github.com/ClickHouse/clickhouse-java/issues/3114)
- **[jdbc-v2, client-v2]** Fixes issue with `FORMAT` in query unable to override format set by client when used with
ClickHouse 26.8+. Default format is `RowBinaryWithNamesAndTypes` set at client level. For JDBC, recommend using
`format=JSONEachRow` to query JSON. Setting `format=` (empty or `null`) omits the format request header so explicit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,10 @@ public void testReadWriteSimpleTypes(String dataType, String zero, String negati
negativeOneValue = ClickHouseUtils.format("'%s'", ClickHouseIntegerValue.of(-1).asUuid());
zeroValue = ClickHouseUtils.format("'%s'", ClickHouseIntegerValue.of(0).asUuid());
positiveOneValue = ClickHouseUtils.format("'%s'", ClickHouseIntegerValue.of(1).asUuid());
} else if (dataType.startsWith(ClickHouseDataType.DateTime64.name())) {
negativeOneValue = ClickHouseUtils.format("'%s'", negativeOne);
zeroValue = ClickHouseUtils.format("'%s'", zero);
positiveOneValue = ClickHouseUtils.format("'%s'", positiveOne);
}

try {
Expand Down
Loading