File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,9 @@ async def _read_key(
416416 if chunk_array is None :
417417 chunk_array_batch .append (None ) # type: ignore[unreachable]
418418 else :
419- if not chunk_spec .config .write_empty_chunks :
419+ if chunk_spec .config .write_empty_chunks :
420+ chunk_array_batch .append (chunk_array )
421+ else :
420422 # The operation array_equal operation below effectively will force the array
421423 # into memory.
422424 # if the result is useful, we want to avoid reading it twice
@@ -429,8 +431,9 @@ async def _read_key(
429431 if chunk_array .all_equal (
430432 fill_value_or_default (chunk_spec )
431433 ):
432- chunk_array = None
433- chunk_array_batch .append (chunk_array )
434+ chunk_array_batch .append (None )
435+ else :
436+ chunk_array_batch .append (chunk_array )
434437
435438 chunk_bytes_batch = await self .encode_batch (
436439 [
You can’t perform that action at this time.
0 commit comments