feat(go): support case-insensitive column names on reads - #796
Open
jackylee-ch wants to merge 1 commit into
Open
feat(go): support case-insensitive column names on reads#796jackylee-ch wants to merge 1 commit into
jackylee-ch wants to merge 1 commit into
Conversation
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.
Purpose
Follow-up to #496, which added the read-time case-sensitivity switch to the core,
the C ABI and Python and left "Go's own opt-in case-insensitive API" to a
follow-up. Measured from Go, fixture columns lowercase:
Neither half is reachable from Go, and the first message names the column absent
when only its case differs.
Brief change log
ReadBuilder.WithCaseSensitivecovers projection. Predicates need their ownswitch, because the core resolves a column when the predicate is built, so
Table.PredicateBuilderWithCaseSensitivecarries the choice into every predicatea builder produces — setting only the read-builder flag would leave the second
line above failing. The additive
paimon_predicate_*_with_case_sensitiveentrypoints are bound for the ten predicates Go already exposes, with the default path
still calling the plain symbols. The six operators C gained in #523 but Go never
bound stay out of scope.
boolis this binding's first non-pointer scalar narrower than four bytes:declared as a 1-byte type, written as an explicit 0/1 since a Rust
booladmitsno other byte, and silently degrading to case-sensitive if got wrong.
Tests
Asserted in both directions: unset and
truestill reject uppercase names,falseresolves them, records come back with the schema's own spelling, and bothcall orders agree. Each of the three predicate argument shapes has a case.
API and Format
Two new Go methods. No ABI, wire or storage change; the C symbols already exist.
Documentation
One
go-binding.mdsection per half.