Skip to content

Commit

Permalink
feat: add support for LogicalPlan::DML(...) serde (apache#14079)
Browse files Browse the repository at this point in the history
* Add support for DML serialization to proto

closes: apache#13616

* add round trip test for DML serde

* cover all cases in round trip test

* minor: change ordering of enum type
  • Loading branch information
milenkovicm authored Jan 13, 2025
1 parent 63b94c8 commit 722307f
Show file tree
Hide file tree
Showing 7 changed files with 427 additions and 8 deletions.
17 changes: 17 additions & 0 deletions datafusion/proto/proto/datafusion.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ message LogicalPlanNode {
UnnestNode unnest = 30;
RecursiveQueryNode recursive_query = 31;
CteWorkTableScanNode cte_work_table_scan = 32;
DmlNode dml = 33;
}
}

Expand Down Expand Up @@ -264,6 +265,22 @@ message CopyToNode {
repeated string partition_by = 7;
}

message DmlNode{
enum Type {
UPDATE = 0;
DELETE = 1;
CTAS = 2;
INSERT_APPEND = 3;
INSERT_OVERWRITE = 4;
INSERT_REPLACE = 5;

}
Type dml_type = 1;
LogicalPlanNode input = 2;
TableReference table_name = 3;
datafusion_common.DfSchema schema = 4;
}

message UnnestNode {
LogicalPlanNode input = 1;
repeated datafusion_common.Column exec_columns = 2;
Expand Down
242 changes: 242 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.

Loading

0 comments on commit 722307f

Please sign in to comment.