Skip to main content

build_add_file_metadata

Function build_add_file_metadata 

Source
pub fn build_add_file_metadata(
    file_metadata: DataFileMetadata,
    write_context: &WriteContext,
) -> DeltaResult<Box<dyn EngineData>>
Expand description

Converts DataFileMetadata into Add action EngineData using the partition values and table root from the provided WriteContext.

Paths in the returned Add action metadata are stored relative to the table root.

This is the public API for building Add action metadata from file write results. Custom Arrow-based engines that write parquet files themselves (bypassing DefaultEngine::write_parquet) should call this to produce the Add action metadata for Transaction::add_files.