Skip to content

Commit 369ddab

Browse files
committed
fix
1 parent 38c3557 commit 369ddab

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

native/core/src/execution/operators/parquet_writer.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,12 @@ impl ExecutionPlan for ParquetWriterExec {
535535
DataFusionError::Execution(format!("Failed to close writer: {}", e))
536536
})?;
537537

538-
// Get file size
539-
let file_size = std::fs::metadata(&part_file)
538+
// Get file size - strip file:// prefix if present for local filesystem access
539+
let local_path = part_file
540+
.strip_prefix("file://")
541+
.or_else(|| part_file.strip_prefix("file:"))
542+
.unwrap_or(&part_file);
543+
let file_size = std::fs::metadata(local_path)
540544
.map(|m| m.len() as i64)
541545
.unwrap_or(0);
542546

0 commit comments

Comments
 (0)