Skip to content

Commit

Permalink
Support encoding and decoding UnnestExec
Browse files Browse the repository at this point in the history
  • Loading branch information
joroKr21 committed Sep 5, 2024
1 parent e4a61ba commit 33001b3
Show file tree
Hide file tree
Showing 7 changed files with 302 additions and 5 deletions.
2 changes: 1 addition & 1 deletion datafusion/physical-expr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ name = "in_list"

[[bench]]
harness = false
name = "is_null"
name = "is_null"
19 changes: 19 additions & 0 deletions datafusion/physical-plan/src/unnest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,25 @@ impl UnnestExec {
input.execution_mode(),
)
}

/// Input execution plan
pub fn input(&self) -> &Arc<dyn ExecutionPlan> {
&self.input
}

/// indices of the list-typed columns in the input schema
pub fn list_column_indices(&self) -> &[usize] {
&self.list_column_indices
}

/// indices of the struct-typed columns in the input schema
pub fn struct_column_indices(&self) -> &[usize] {
&self.struct_column_indices
}

pub fn options(&self) -> &UnnestOptions {
&self.options
}
}

impl DisplayAs for UnnestExec {
Expand Down
11 changes: 10 additions & 1 deletion datafusion/proto/proto/datafusion.proto
Original file line number Diff line number Diff line change
Expand Up @@ -742,10 +742,11 @@ message PhysicalPlanNode {
AnalyzeExecNode analyze = 23;
JsonSinkExecNode json_sink = 24;
SymmetricHashJoinExecNode symmetric_hash_join = 25;
InterleaveExecNode interleave = 26;
InterleaveExecNode interleave = 26;
PlaceholderRowExecNode placeholder_row = 27;
CsvSinkExecNode csv_sink = 28;
ParquetSinkExecNode parquet_sink = 29;
UnnestExecNode unnest = 30;
}
}

Expand Down Expand Up @@ -802,6 +803,14 @@ message ParquetSinkExecNode {
PhysicalSortExprNodeCollection sort_order = 4;
}

message UnnestExecNode {
PhysicalPlanNode input = 1;
datafusion_common.Schema schema = 2;
repeated uint64 list_type_columns = 3;
repeated uint64 struct_type_columns = 4;
UnnestOptions options = 5;
}

message PhysicalExtensionNode {
bytes node = 1;
repeated PhysicalPlanNode inputs = 2;
Expand Down
180 changes: 180 additions & 0 deletions datafusion/proto/src/generated/pbjson.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion datafusion/proto/src/generated/prost.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 33001b3

Please sign in to comment.