Skip to content

Commit

Permalink
ARROW-7889: [Rust] Add support to datafusion-cli for parquet files.
Browse files Browse the repository at this point in the history
At present, using datafusion-cli with a parquet file results in an error that Parquet is unsupported.

This change allows the registration of parquet files with `CREATE EXTERNAL TABLE`.

Closes #6456 from maxburke/parquet_datafusion_cli and squashes the following commits:

5aad806 <Max Burke> cargo fmt
138717c <Max Burke> Add support to datafusion-cli for parquet files.

Authored-by: Max Burke <max@urbanlogiq.com>
Signed-off-by: Krisztián Szűcs <szucs.krisztian@gmail.com>
  • Loading branch information
maxburke authored and kszucs committed Feb 20, 2020
1 parent 9834601 commit 5549d72
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rust/datafusion/src/execution/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ impl ExecutionContext {
self.register_csv(name, location, schema, *header_row);
Ok(vec![])
}
FileType::Parquet => {
self.register_parquet(name, location)?;
Ok(vec![])
}
_ => Err(ExecutionError::ExecutionError(format!(
"Unsupported file type {:?}.",
file_type
Expand Down

0 comments on commit 5549d72

Please sign in to comment.