Skip to content

Commit 30a80b0

Browse files
committed
fix: logic.
1 parent 2ad940d commit 30a80b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

turu-snowflake/src/turu/snowflake/record/async_record_cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def fetch_pandas_batches(
3939
if isinstance(self._recorder, turu.core.record.CsvRecorder):
4040
if limit := self._recorder._options.get("limit"):
4141
async for batch in batches:
42-
yield batch
42+
yield batch.head(limit)
4343

4444
limit -= len(batch)
4545
if limit <= 0:

turu-snowflake/src/turu/snowflake/record/record_cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def fetch_pandas_batches(self, **kwargs) -> Iterator[GenericPandasDataFrame]:
3535
if isinstance(self._recorder, turu.core.record.CsvRecorder):
3636
if limit := self._recorder._options.get("limit"):
3737
for batch in batches:
38-
yield batch
38+
yield batch.head(limit)
3939

4040
limit -= len(batch)
4141
if limit <= 0:

0 commit comments

Comments
 (0)