Trait LocationGenerator

Source
pub trait LocationGenerator:
    Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn generate_location(
        &self,
        partition_key: Option<&PartitionKey>,
        file_name: &str,
    ) -> String;
}
Expand description

LocationGenerator used to generate the location of data file.

Required Methods§

Source

fn generate_location( &self, partition_key: Option<&PartitionKey>, file_name: &str, ) -> String

Generate an absolute path for the given file name that includes the partition path.

§Arguments
  • partition_key - The partition key of the file. If None, generate a non-partitioned path.
  • file_name - The name of the file
§Returns

An absolute path that includes the partition path, e.g., “/table/data/id=1/name=alice/part-00000.parquet” or non-partitioned path: “/table/data/part-00000.parquet”

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§