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
But this is not supported for functions that return bytea, jsonb or arrays. They have to return owned Box<[u8]>, JsonbVal or ListVal right now, which causes unnecessary overhead of malloc and memcpy.
Describe the solution you'd like
Similar to varchar, we can support a writer of type impl std::io::Write for bytea:
wangrunji0408
changed the title
perf(expr): support writer-style #[function] for bytea and jsonb type
perf(expr): support writer-style #[function] for bytea, jsonb and array type
Nov 8, 2023
Is your feature request related to a problem? Please describe.
For functions that return
varchar
, we now support writer-style signatures, allowing functions to write results directly to the array buffer.But this is not supported for functions that return
bytea
,jsonb
or arrays. They have to return ownedBox<[u8]>
,JsonbVal
orListVal
right now, which causes unnecessary overhead of malloc and memcpy.Describe the solution you'd like
Similar to varchar, we can support a writer of type
impl std::io::Write
for bytea:and type
JsonbBuilder(jsonbb::Builder)
for jsonb:Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: