jay
09/26/2024, 4:00 PMdf = daft.from_glob_paths("...")
df = df.with_column("is_parquet", df["path"].url.is_parquet())
df = df.with_column("schemas", df["path"].url.parquet_schema())
# Merge schemas
df = df.agg(df["schemas"].merge_schemas())
# Check schema compatibility
df = df.with_column("compatible", df["schemas"].schema_compat(other_df.schema()))
Could be cool if we wanted to extend our schema inference behaviors to be even more sophisticated…
Definitely also strays dangerously close to maybe also wanting to doing this for statistics over files? 😬Sammy Sidhu
09/26/2024, 4:50 PMEverett Kleven
09/26/2024, 10:40 PM[
“node_id”: pa.string(),
“node_type”: pa.string(),
“node_binary”:pa.binary(),
“node_meta”:pa.map_(pa.string(),pa.string())
]
If the pa.binary() class contained a bunch of encoding/serialization metadata, that would be huge.Everett Kleven
09/26/2024, 10:45 PMEverett Kleven
09/26/2024, 10:45 PMjay
09/27/2024, 4:18 PM