Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add parquet source to python ffi #749

Merged
merged 19 commits into from
Sep 17, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix guard
  • Loading branch information
bjchambers committed Sep 15, 2023
commit 5397cde3a5980bdb9048ec493f03840619c043d8
32 changes: 17 additions & 15 deletions crates/sparrow-runtime/src/execute/operation/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,24 @@ impl ScanOperation {
//
// Ideally, we don't support both paths.
if table_source.is_none() && !table_info.file_sets.is_empty() {
let prepared_files = table_info
.file_sets
.prepared_files(&None)
.into_report()
.change_context(Error::Internal("failed to get prepared files"))?;
{
let prepared_files = table_info
.file_sets
.prepared_files(&None)
.into_report()
.change_context(Error::Internal("failed to get prepared files"))?;

// Send initial progress information.
let total_num_rows = prepared_files
.iter()
.map(|file| file.num_rows as usize)
.sum();
context
.progress_updates_tx
.try_send(ProgressUpdate::InputMetadata { total_num_rows })
.into_report()
.change_context(Error::internal())?;
// Send initial progress information.
let total_num_rows = prepared_files
.iter()
.map(|file| file.num_rows as usize)
.sum();
context
.progress_updates_tx
.try_send(ProgressUpdate::InputMetadata { total_num_rows })
.into_report()
.change_context(Error::internal())?;
}

let input_stream = table_reader(
&context.object_stores,
Expand Down