Skip to content

Commit e348b45

Browse files
milenkovicmRudolf Lorenz
authored andcommitted
feat: add support for LogicalPlan::DML(...) serde (apache#14079)
* 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
1 parent 017d529 commit e348b45

7 files changed

Lines changed: 454 additions & 8 deletions

File tree

datafusion/proto/proto/datafusion.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ message LogicalPlanNode {
6161
UnnestNode unnest = 30;
6262
RecursiveQueryNode recursive_query = 31;
6363
CteWorkTableScanNode cte_work_table_scan = 32;
64+
DmlNode dml = 33;
6465
}
6566
}
6667

@@ -262,6 +263,22 @@ message CopyToNode {
262263
repeated string partition_by = 7;
263264
}
264265

266+
message DmlNode{
267+
enum Type {
268+
UPDATE = 0;
269+
DELETE = 1;
270+
CTAS = 2;
271+
INSERT_APPEND = 3;
272+
INSERT_OVERWRITE = 4;
273+
INSERT_REPLACE = 5;
274+
275+
}
276+
Type dml_type = 1;
277+
LogicalPlanNode input = 2;
278+
TableReference table_name = 3;
279+
datafusion_common.DfSchema schema = 4;
280+
}
281+
265282
message UnnestNode {
266283
LogicalPlanNode input = 1;
267284
repeated datafusion_common.Column exec_columns = 2;

datafusion/proto/src/generated/pbjson.rs

Lines changed: 242 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)