Conversation
pupyarrow hands out string columns as LazyBinaryArrays as well, but their
elements are plain `str`s, so `data._optimal_read_size = ...` raised
ValueError: Failed to decode column __key__ ...: 'str' object has no
attribute '_optimal_read_size'
for every non-binary column of an S3/Modal shard (`__key__`, `audio_type`).
Check the value, not the column.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On
main, reading any string column through an S3 (or Modal) shard fails:pupyarrow exposes string columns as
LazyBinaryArrays too, but their elements are plainstrs, so theisinstance(col, LazyBinaryArray)guard lets them through anddata._optimal_read_size = …blows up. Affects__key__,audio_type, … — everything except the binary blob itself.Fix
Check the value (
isinstance(data, LazyBuffer)), not the column. Same two lines inWSS3ShardandWSModalShard.Testing
Against a real B2 shard:
get_sample('__key__'),get_sample('audio_type'), andget_sample('audio').read_segment(1, 2)all work. Existing test-suite result unchanged (the 6 doctest failures that need local datasets are pre-existing onmain).Needed by #90 for linking
audio_typealongsideaudio; independent otherwise.🤖 Generated with Claude Code