aboutsummaryrefslogtreecommitdiffstats
path: root/lib/nt.ml
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-06-04 02:17:34 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-06-13 00:28:12 +0000
commited1c73f5a05d9630c1bd1216d97d38b97f23bbc6 (patch)
tree9b1f2cd581a742f3ea1ee55fa565ba24f53ebb83 /lib/nt.ml
parentbf23291e86fc2114ebad38f9493f0a02a4199fb8 (diff)
downloadSakura-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.ml18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/nt.ml b/lib/nt.ml
index 41de1d0..a6f427a 100644
--- a/lib/nt.ml
+++ b/lib/nt.ml
@@ -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