Skip to content
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

feat(expr): add jsonb_build_array/object function #13198

Merged
merged 9 commits into from
Nov 6, 2023
Prev Previous commit
Next Next commit
fix slt
Signed-off-by: Runji Wang <wangrunji0408@163.com>
  • Loading branch information
wangrunji0408 committed Nov 3, 2023
commit 466b300b3c464917979de97a2da738f283651fc5
4 changes: 2 additions & 2 deletions src/expr/impl/src/scalar/jsonb_build.rs
Original file line number Diff line number Diff line change
@@ -47,9 +47,9 @@ fn jsonb_build_array(args: impl Row) -> Result<JsonbVal> {
///
/// ```slt
/// query T
/// select jsonb_build_object('foo', 1, 2, row(3,'bar'));
/// select jsonb_build_object('foo', 1, 2, 'bar');
/// ----
/// {"foo": 1, "2": {"f1": 3, "f2": "bar"}}
/// {"foo": 1, "2": "bar"}
/// ```
#[function("jsonb_build_object(...) -> jsonb")]
fn jsonb_build_object(args: impl Row) -> Result<JsonbVal> {