mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-05 03:12:57 +00:00
[Python]Fix record_batch_generator (#483)
Should fix - https://github.com/lancedb/lancedb/issues/482
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user