Conversation
|
@xzkostyan I've marked the PR as ready, please review. |
|
Not ready yet, after some testing with our software we found out that this column has trouble parsing Array(JSON) and Array(Array) values. Will fix this in the next few days, the majority of code should still be good for review. |
|
Seems to be ready now, added additional tests for checking compatibility with the CLI. |
|
There's a problem that it's not compatible with the CLI when using array-nested dictionaries at more than five layers of nesting. I probably won't add this functionality since it's too niche of a use case. |
|
The problem was the inability to deserialize shared JSON when max_dynamic_paths and max_dynamic_types are exceeded. It uses a separate undocumented format I sadly don't have time to work on right now. Dynamic JSON serialization I implemented seems to be fully compatible with itself and works well for objects inserted with other libraries/clients that don't exceed the dynamic paths limit (1024 dynamic paths by default and /4 on every array-nested dictionary). Requesting review @xzkostyan |
|
Any indication on when this will be merged? |
|
+1 |
|
Any update on this? This is a big blocker for me currently. |
Not yet, the maintainer has to review the PR. You can try this out for now and let me know if it works. |
|
+1 |
|
@yuangezhizao Thanks for the test! Glad to hear it works |
|
@gsergey418 thanks for the PR. Works smoothly with JSON types but with Array(JSON) I get an error by insert even if I try to insert empty arrays, sample insert: stack trace: |
|
Thanks for the PR. We really need this supported officially, as we rely heavily on json type. |
|
I would also like to voice my support for this PR (or any other PR that can implement JSON support for this library). |
|
When I tested this PR, I hit one issue: when the JSON contains dynamic keys (like user-defined keys) the SELECT could fail if the data part contains more than 128 distincts keys. My usage is JSON fields that store attribute of a log line. Each log line's attribute could be user-defined (not a fixed set of keys, e.g. one line could have The following test exhibit the bug: |
|
Any updates on this? |
|
When will this get merged? |
|
Hi Team, any update in this? |


Add support for the new JSON type. My company uses this driver lib to interact with CH and we rely heavily on the JSON type. Any help would be greatly appreciated since I don't know much about writing database drivers.
Checklist:
flake8and fix issues.pytestno tests failed. See https://clickhouse-driver.readthedocs.io/en/latest/development.html.