uqa_execution/batch/
schema_runtime.rs1use super::{ExecResult, PhysicalRow, PhysicalRowView, RowSchema};
10
11pub trait RowSchemaExecution {
13 fn view<'a>(&'a self, row: &'a PhysicalRow) -> PhysicalRowView<'a>;
14
15 fn relayout_physical_row(
16 &self,
17 row: PhysicalRow,
18 target: &RowSchema,
19 ) -> ExecResult<PhysicalRow>;
20}
21
22impl RowSchemaExecution for RowSchema {
23 fn view<'a>(&'a self, row: &'a PhysicalRow) -> PhysicalRowView<'a> {
24 PhysicalRowView { schema: self, row }
25 }
26
27 fn relayout_physical_row(
28 &self,
29 row: PhysicalRow,
30 target: &RowSchema,
31 ) -> ExecResult<PhysicalRow> {
32 let slots = self.relayout_slots(target)?;
33 Ok(row.project_slots(&slots))
34 }
35}