You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that if the table schema has a Default column with a Hash function, that hash function or any other functions are not executed on the server side.
Steps to reproduce
Create a simple schema as shown below.
CREATETABLEexp.student (
name String,
age Int64,
marks Int64 DEFAULT 10,
fingerPrint UInt64 DEFAULT xxHash64(name)
) ENGINE = MergeTree()
ORDER BY name;
Using the below Java client v2 code, I am inserting a record single record with only name and age. The expectation is that the server should update the marks with 10 and for fingerPrint, the server should generate a xxHash64 using the name. But I see 0 values in the table.
2024.12.04 09:34:26.225315 [ 1558 ] {44c7fa95-bac7-4dcb-a473-44e1ebc3341d} executeQuery: (from 192.168.65.1:43269) INSERT INTO exp.student FORMAT RowBinaryWithDefaults (stage: Complete)
From the log we can see, Java client-v2 by default uses RowBinaryWithDefaults format.
chernser
changed the title
Java client-v2 doesn't support default functions like xxHash64
[client-v2] Java client-v2 doesn't support default functions like xxHash64
Dec 6, 2024
Describe the bug
I noticed that if the table schema has a Default column with a Hash function, that hash function or any other functions are not executed on the server side.
Steps to reproduce
Expected behaviour
The default value or the requested function has to be executed on the server side and that value has to be updated in the record.
Code example
Error log
No error log, below are the successful logs
Configuration
Environment
ClickHouse server
CREATE TABLE
statements for tables involved:The text was updated successfully, but these errors were encountered: