Skip to content

Commit

Permalink
feat: add Arrow and Orc file formats (#169)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The `substrait/ReadRel/LocalFiles/format` field is deprecated. This will cause a hard break in compatibility. Newer consumers will not be able to read older files. Older consumers will not be able to read newer files. One should now express format concepts using the file_format oneof field.

Co-authored-by: Jacques Nadeau <[email protected]>
  • Loading branch information
westonpace and jacques-n authored Jun 5, 2022
1 parent 32b2b3e commit 43be00a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions proto/substrait/algebra.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ message ReadRel {
string uri_folder = 4;
}

FileFormat format = 5;
// Original file format enum, superseded by the file_format oneof.
reserved 5;
reserved "format";

// the index of the partition this item belongs to
uint64 partition_index = 6;
Expand All @@ -113,9 +115,16 @@ message ReadRel {
// the length in byte to read from this item
uint64 length = 8;

enum FileFormat {
FILE_FORMAT_UNSPECIFIED = 0;
FILE_FORMAT_PARQUET = 1;
message ParquetReadOptions {}
message ArrowReadOptions {}
message OrcReadOptions {}

// The format of the files.
oneof file_format {
ParquetReadOptions parquet = 9;
ArrowReadOptions arrow = 10;
OrcReadOptions orc = 11;
google.protobuf.Any extension = 12;
}
}
}
Expand Down

0 comments on commit 43be00a

Please sign in to comment.