From 5d6118e04b2b1a6de9bf577144db01dc376b3dd3 Mon Sep 17 00:00:00 2001 From: Jan Heinrich Reimer Date: Thu, 4 Jul 2024 01:43:39 +0200 Subject: [PATCH] Use schema when generating tables --- ray_elasticsearch/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ray_elasticsearch/__init__.py b/ray_elasticsearch/__init__.py index c9e7a1c..1d85c0c 100644 --- a/ray_elasticsearch/__init__.py +++ b/ray_elasticsearch/__init__.py @@ -130,7 +130,10 @@ def iter_blocks() -> Iterator[Table]: hits = response["hits"]["hits"] if len(hits) == 0: break - yield Table.from_pylist(hits) + yield Table.from_pylist( + mapping=hits, + schema=schema, + ) search_after = max( hit["sort"] for hit in hits