-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nullable fields #5
Comments
@archan937 , can this be merged? |
@workgena, have you been able to create any documentation regarding the use cases for, and the behavior of the Nullable feature? Let me know if you need any help typing something up. |
Aside from fixing NULL on select, NULLs on INSERT still won't be handled well with the CSVWithNames format that the ruby driver uses due to this existing issue: ClickHouse/ClickHouse#469 I'm unable to insert where the schema says the field is Nullable and the record passed to Clickhouse.connection.insert_rows has a null value. Attempting the same insert with clickhouse-client CLI with a few different variations of "NULL", e.g. empty string, \N, gives same error. FWIW, the JSONRows import format handles nulls fine, so modifying Clickhouse.connection.insert_rows to use that if there's a nil valued field is a way to make it work. |
Recently Yandex added support for Nullable types. But this gem does not support them.
Nullable fields are not documented yet. Some info can be found here
I forked gem and fixed this issue:
https://github.com/workgena/clickhouse/pull/1/files
https://github.com/workgena/clickhouse/pull/2/files
I'll try to write some test on this and create PR later.
The text was updated successfully, but these errors were encountered: