-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
RFC: Zero copy JSONB support #501
Comments
If I can help with simd-json feel free to ping :) |
We were discussing last day and @eeeebbbbrrrr corrected me that |
If we're to do this, I think we're gonna need to basically reimplement As priorities go for all the things we're doing, this issue is pretty low, so we got time to noodle things more. |
https://github.com/datafuselabs/jsonb Looks like a pretty complete reimplementation of jsonb in rust. I'm currently looking at doing some heavier work with JSONB fields in pgrx that I suspect could be greatly enhanced by direct parsing of jsonb rather than jsonb->json-> Value. I'm willing to take on some work to try to make this work, but would likely need some guidance. Any thoughts on the jsonb library and whether that would be suitable to work in this context? |
Neat. I think we’d entertain using that crate if it actually works. I suspect the hard part here will be managing lifetimes behind the raw Datum pointer. I think we’d want to take advantage of the Cow<‘a, &str> if we can — otherwise there’s little point. |
We are exploring ways to support
JSONB
in a zero copy way. Right nowJSONB
maps topgx::Json(serde_json::Value)
, but we'd like to be able to use this data without necessarily creating a copy.@Licenser's
simd-json
crate supports aBorrowedValue
API which may fit our needs.serde
also can support zero copy deserialization.The text was updated successfully, but these errors were encountered: