Commits


octalene authored and GitHub committed 1155f240ec2
ARROW-16424: [C++] Use Uri to parse substrait ReadRel file path (#14071) A PR to subsume #13390 I tried to add on to #13390, but then I rebased and now it seems really complicated to add to that PR. This PR primarily uses `Uri` to parse file URIs extracted from `substrait::ReadRel`. This occurs when `FromProto` is called on a `Relation` that is a read type (`ReadRel`). Additionally, to make `FromProto` a bit more readable, I moved the code for this case into a separate function, `FromReadRelation`. This function has the following overall flow: 1. Validate ReadRel 2. Initialize FileFormat from the 1st file URI 3. foreach file URI: 1. Validate the proto URI 2. Parse using the Uri class 3. Validate the Uri (should be a `file:///` path) 4. Accumulate `FileInfo` instances using `LocalFileSystem` 4. return DeclarationInfo for dataset scan over the file URIs Validation functions are prefixed with `Check` to match `CheckRelCommon`. Lead-authored-by: Aldrin M <octalene.dev@pm.me> Co-authored-by: Aldrin Montana <octalene.dev@pm.me> Co-authored-by: octalene <octalene.dev@pm.me> Signed-off-by: Antoine Pitrou <antoine@python.org>