Skip to content

Commit 722307f

Browse files
authored
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 63b94c8 commit 722307f

File tree

7 files changed

+427
-8
lines changed

7 files changed

+427
-8
lines changed

datafusion/proto/proto/datafusion.proto

+17
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

@@ -264,6 +265,22 @@ message CopyToNode {
264265
repeated string partition_by = 7;
265266
}
266267

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

datafusion/proto/src/generated/pbjson.rs

+242
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)