Add AnyUtf8: one logical type for any UTF-8 encoding#10
Merged
Conversation
The string sibling of `AnyBinary`/`AnyList`: `Column<AnyUtf8>` accepts any of arrow's UTF-8 encodings — `Utf8`, `LargeUtf8`, or `Utf8View` — and reads them all uniformly as `&str`. Parse-only: implements `LogicalType` (and `RefType`) but not `ConcreteType`, so no `from_values`/`Default`/schema; build a concrete encoding such as `Column<Utf8>`. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
The string sibling of
AnyBinary/AnyList: a quiver-only logical type that accepts any of arrow's UTF-8 encodings and reads them uniformly as&str.AnyUtf8Utf8,LargeUtf8,Utf8View&strDetails
AnyTypedUtf8over the three arrow string arrays;downcastdispatches onarray.data_type()and reads every element as&str.LogicalTypeandRefType(sotry_from/reading/column[i]work) but notConcreteType— no single arrow datatype, so nofrom_values/Default/schema. Build a concrete encoding such asColumn<Utf8>.AnyBinary— there's nothing extra to include.)Option<AnyUtf8>like any other column.Verification
cargo clippy --all-features --all-targetsclean,cargo fmt --allappliedcargo test --all-featuresgreen, incl. a newany_utf8_columnstest: all three encodings read uniformly,RefTypeindexing, non-string rejected, null handling (Option<AnyUtf8>+ non-nullable rejection)cargo doc --document-private-items -D warningscleanAnyListsection🤖 Generated with Claude Code