diff options
| author | Marcos <maguetamarcos@gmail.com> | 2025-01-19 02:00:15 -0300 |
|---|---|---|
| committer | Marcos <maguetamarcos@gmail.com> | 2025-01-19 02:00:15 -0300 |
| commit | 3a32e46f647314aea380449b31384ad121f31e4e (patch) | |
| tree | d57817ee539e63b717c514928d82f8537ee08c27 /lib/planner.ml | |
| parent | c67ed574a7a95db73d9349d58727452850bd47b9 (diff) | |
| download | Sakura-3a32e46f647314aea380449b31384ad121f31e4e.tar.gz Sakura-3a32e46f647314aea380449b31384ad121f31e4e.zip | |
unite relation attributes by entity map
Diffstat (limited to 'lib/planner.ml')
| -rw-r--r-- | lib/planner.ml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/planner.ml b/lib/planner.ml index b88090d..f0fbc59 100644 --- a/lib/planner.ml +++ b/lib/planner.ml @@ -1,5 +1,5 @@ module Scan = struct - open Disk + (* open Disk let execute commit locations (entity: string) = let binary = Executor.read commit locations ~filename:("schema~" ^ entity) in let relation = @@ -11,11 +11,11 @@ module Scan = struct let attrs = List.map (fun (a: Schema.Protocol.attribute) -> relation.name ^ "/" ^ a.name) relation.attributes in Executor.read commit locations ~filename:("schema~" ^ entity) end - | Error err -> failwith err + | Error err -> failwith err *) end module Join = struct - open Disk + (* open Disk let execute (left_attributes: bytes list) (right_attributes: bytes list) locations = (* Redundant operations that are already in the locations, but this is easier to implement now *) (* Fix this when we persist the indexes *) @@ -26,8 +26,7 @@ module Join = struct let indexes = List.filter_map (fun (lindex, lhash) -> Option.map (fun (rindex, rhash, _) -> lindex, rindex, lhash, rhash) @@ List.find_opt (fun (_rindex, _rhash, references) -> List.exists ((=) lhash) references) references_locations_right) left_computed_hashes - in List.map (fun (lindex, rindex, _, _) -> List.nth left_attributes lindex, List.nth right_attributes rindex) indexes - + in List.map (fun (lindex, rindex, _, _) -> List.nth left_attributes lindex, List.nth right_attributes rindex) indexes *) end module Filter = struct |
