[Python]Fix record_batch_generator (#483)

Should fix - https://github.com/lancedb/lancedb/issues/482
This commit is contained in:
Ayush Chaurasia
2023-09-08 21:18:50 +05:30
committed by GitHub
parent 6799613109
commit aa7806cf0d
2 changed files with 3 additions and 1 deletions

View File

@@ -102,7 +102,8 @@ def _to_record_batch_generator(
table = _sanitize_data(batch, schema, metadata, on_bad_vectors, fill_value)
for batch in table.to_batches():
yield batch
yield batch
else:
yield batch
class Table(ABC):

View File

@@ -143,6 +143,7 @@ def test_ingest_iterator(tmp_path):
tbl_len = len(tbl)
tbl.add(make_batches())
assert tbl_len == 50
assert len(tbl) == tbl_len * 2
assert len(tbl.list_versions()) == 3
db.drop_database()