diff --git a/ray_elasticsearch/__init__.py b/ray_elasticsearch/__init__.py index 1d85c0c..b6343c4 100644 --- a/ray_elasticsearch/__init__.py +++ b/ray_elasticsearch/__init__.py @@ -132,7 +132,11 @@ def iter_blocks() -> Iterator[Table]: break yield Table.from_pylist( mapping=hits, - schema=schema, + schema=( + schema + if schema is not None and isinstance(schema, Schema) + else None + ), ) search_after = max( hit["sort"]