Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions python/pyspark/sql/pandas/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1573,8 +1573,11 @@ def gen_data_and_state(batches):
# no more data with grouping key + state
break

data_start_offset = state_info_col["startOffset"]
num_data_rows = state_info_col["numRows"]
# The int fields of the state struct are converted to float when the batch
# contains padding (null) state rows. PyArrow >= 26 rejects float offsets
# in slice(), so convert them back to int.
data_start_offset = int(state_info_col["startOffset"])
num_data_rows = int(state_info_col["numRows"])
is_last_chunk = state_info_col["isLastChunk"]

if state_for_current_group:
Expand Down