dy.Any columns should be ignored in the validation when reading from a parquet file.
from pathlib import Path
import dataframely as dy
import polars as pl
class S(dy.Schema):
a = dy.Any()
class C(dy.Collection):
df : dy.LazyFrame[S]
df = pl.DataFrame({"a": 0})
collection = C.validate({"df": df})
Path("./tmp").mkdir(exist_ok=True)
collection.write_parquet("./tmp")
collection.read_parquet("./tmp").df.collect()
# InvalidOperationError: conversion from `i64` to `null` failed in column 'a' for 1 out of 1 values: [0]
# This error occurred in the following expression:
# col("a").strict_cast(Null)