diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-06-04 02:17:34 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-06-13 00:28:12 +0000 |
| commit | ed1c73f5a05d9630c1bd1216d97d38b97f23bbc6 (patch) | |
| tree | 9b1f2cd581a742f3ea1ee55fa565ba24f53ebb83 /lib/nt.ml | |
| parent | bf23291e86fc2114ebad38f9493f0a02a4199fb8 (diff) | |
| download | Sakura-ed1c73f5a05d9630c1bd1216d97d38b97f23bbc6.tar.gz Sakura-ed1c73f5a05d9630c1bd1216d97d38b97f23bbc6.zip | |
Also send the attributes to join on over to the NT sideproper-joins
Diffstat (limited to 'lib/nt.ml')
| -rw-r--r-- | lib/nt.ml | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -305,19 +305,23 @@ module Make (B : Backend) = struct (match Nt_ffi.ptr_to_opt raw with | None -> Error (Error.cursor_error ("plan_scan failed for path: " ^ path)) | Some p -> Ok p) - | Join { left; right; _ } -> + | Join { left; right; on_attrs } -> let* lp = build_plan left in (match build_plan right with | Error e -> Nt_ffi.rnt_plan_free (Nt_ffi.nint_to_ptr lp); Error e | Ok rp -> - let raw = Nt_ffi.rnt_plan_join - (Nt_ffi.nint_to_ptr lp) (Nt_ffi.nint_to_ptr rp) in - (* join takes ownership of both children — no manual free needed *) - (match Nt_ffi.ptr_to_opt raw with - | None -> Error (Error.cursor_error "plan_join failed") - | Some p -> Ok p)) + Nt_ffi.with_strings_as_char_array on_attrs (fun on_attrs' -> + let raw = Nt_ffi.rnt_plan_join + (Nt_ffi.nint_to_ptr lp) + (Nt_ffi.nint_to_ptr rp) + on_attrs' + in + (* join takes ownership of both children — no manual free needed *) + (match Nt_ffi.ptr_to_opt raw with + | None -> Error (Error.cursor_error "plan_join failed") + | Some p -> Ok p))) | Take { limit; source } -> let* sp = build_plan source in let raw = Nt_ffi.rnt_plan_take |
