MCPcopy Create free account
hub / github.com/apache/datafusion / generate_file_path

Function generate_file_path

datafusion/datasource/src/write/demux.rs:253–268  ·  view source on GitHub ↗

Helper for row count demuxer

(
    base_output_path: &ListingTableUrl,
    write_id: &str,
    part_idx: usize,
    file_extension: &str,
    single_file_output: bool,
)

Source from the content-addressed store, hash-verified

251
252/// Helper for row count demuxer
253fn generate_file_path(
254 base_output_path: &ListingTableUrl,
255 write_id: &str,
256 part_idx: usize,
257 file_extension: &str,
258 single_file_output: bool,
259) -> Path {
260 if !single_file_output {
261 base_output_path
262 .prefix()
263 .clone()
264 .join(format!("{write_id}_{part_idx}.{file_extension}"))
265 } else {
266 base_output_path.prefix().to_owned()
267 }
268}
269
270/// Helper for row count demuxer
271fn create_new_file_stream(

Callers 1

create_new_file_streamFunction · 0.85

Calls 3

prefixMethod · 0.80
joinMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…