-
Notifications
You must be signed in to change notification settings - Fork 49
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
Nested array limitations #343
Labels
Comments
This was referenced Jul 29, 2020
Stale issue message |
HI @c0c0n3 @chicco785 , I would like to contribute this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
Crate (
3.x
and4.x
) does not support nested arrays, not even in a JSON document. In fact, the reference section on arrays makes it plain:What's surprising though is that the
object
type doesn't support storing a JSON document containing nested arrays---this doesn't seem to be documented anywhere, so perhaps it's a bug. Here's an example where we create a table with two columnsx
andy
of typeobject
andarray(object)
, respectively. Inserting an object inx
that has a plain array field works but trying the same with a nested array fails with a misleading exception message. Trying to insert the same object as an element of an array value iny
also fails but at least the exception message tells you why.Notice nested arrays work in Timescale. For example all the above statements work flawlessly in Timescale.
Proposed solution
Well, I don't have a good one at the moment. One thing we should do though is to at least document this as a limitation when using the Crate backend. Also, we should probably file a bug with the Crate guys so it might get fixed in a future Crate release. Then we should brainstorm and consider this problem along side #147, #36, and #24 to come up with better overall support for arrays.
Additional context
#322, #147, #36, #24.
The text was updated successfully, but these errors were encountered: