Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions proto/substrait/algebra.proto
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,49 @@ message ReadRel {
}
}

// This operator passes-through while writing to an external sink
message WriteRel {
RelCommon common = 1;
Rel input = 2;
substrait.extensions.AdvancedExtension advanced_extension = 10;

oneof write_type {
LocalFiles local_files = 3;
}

message LocalFiles {

// The consumer should avoid data duplication across items
repeated FileOrFiles items = 1;
substrait.extensions.AdvancedExtension advanced_extension = 10;

message FileOrFiles {
oneof path_type {
string uri_path = 1;
string uri_path_glob = 2;
string uri_file = 3;
string uri_folder = 4;
}

FileFormat format = 5;

// the index of the partition this item belongs to
uint64 partition_index = 6;

// the project-expressions to apply when writing this item
repeated Expression project_expressions;

// the filter-condition to apply when writing this item
Expression filter_condition;

enum FileFormat {
FILE_FORMAT_UNSPECIFIED = 0;
FILE_FORMAT_PARQUET = 1;
}
}
}
}

// This operator allows to represent calculated expressions of fields (e.g., a+b). Direct/Emit are used to represent classical relational projections
message ProjectRel {
RelCommon common = 1;
Expand Down Expand Up @@ -361,6 +404,7 @@ message Rel {
ExtensionMultiRel extension_multi = 10;
ExtensionLeafRel extension_leaf = 11;
CrossRel cross = 12;
WriteRel write = 13;
}
}

Expand Down