lancedb_haystack.schema.serialization ===================================== .. py:module:: lancedb_haystack.schema.serialization Functions --------- .. autoapisummary:: lancedb_haystack.schema.serialization.field_to_dict lancedb_haystack.schema.serialization.pyarrow_struct_to_dict lancedb_haystack.schema.serialization.pyarrow_schema_to_dict lancedb_haystack.schema.serialization.dict_to_field lancedb_haystack.schema.serialization.dict_to_pyarrow_struct lancedb_haystack.schema.serialization.dict_to_pyarrow_schema Module Contents --------------- .. py:function:: field_to_dict(field: pyarrow.Field) -> dict Convert a PyArrow field to a dictionary representation, including nested fields. :param field: The PyArrow field to convert. :return: The dictionary representation of the field. .. py:function:: pyarrow_struct_to_dict(struct_type: pyarrow.StructType) -> dict Convert a PyArrow StructType to a dictionary representation, including nested fields. :param struct_type: The PyArrow StructType to convert. :return: The dictionary representation of the StructType. .. py:function:: pyarrow_schema_to_dict(schema: pyarrow.Schema) -> dict Convert a PyArrow schema to a JSON representation. :param schema: The PyArrow schema to convert. :return: The JSON representation of the schema. .. py:function:: dict_to_field(field_dict: dict) -> pyarrow.Field Convert a dictionary representation of a field back to a PyArrow field, including nested fields. :param field_dict: The dictionary representation of the field. :return: The reconstructed PyArrow field. .. py:function:: dict_to_pyarrow_struct(struct_dict: dict) -> pyarrow.StructType Convert a dict representation of a struct type back to a PyArrow StructType. :param struct_dict: The dict representation of the struct. :return: The reconstructed PyArrow StructType. .. py:function:: dict_to_pyarrow_schema(schema_dict: dict) -> pyarrow.Schema Convert a dict representation of a schema back to a PyArrow schema. :param schema_dict: The dict representation of the schema. :return: The reconstructed PyArrow schema.