feat(go): support case-insensitive column names on reads - #796
Open
jackylee-ch wants to merge 3 commits into
Open
feat(go): support case-insensitive column names on reads#796jackylee-ch wants to merge 3 commits into
jackylee-ch wants to merge 3 commits into
Conversation
JingsongLi
reviewed
Sep 11, 2026
| type PredicateBuilder struct { | ||
| table *Table | ||
| table *Table | ||
| caseSensitive bool |
Contributor
There was a problem hiding this comment.
Why we need to add this API? Only for GO?
Contributor
Author
There was a problem hiding this comment.
Not Go-only: the split is core's and the C ABI's, both merged in #496, whose description left Go's half to a follow-up. Python needs a single switch only because its filter is a dict converted at with_filter time; Go's WithFilter takes an already-resolved handle, so the flag has to sit on the builder that produces the predicate.
Collapsed it into PredicateBuilder.WithCaseSensitive in 23e53fa so both halves share one switch name and Table gains no method. go test ./... in bindings/go green, including a new test pinning that neither switch reaches the other.
Replace Table.PredicateBuilderWithCaseSensitive with a WithCaseSensitive method on PredicateBuilder itself, returning a copy rather than mutating. Table gains no method, and both halves of the feature now share one switch name with ReadBuilder.WithCaseSensitive. Also pin the two contracts that were documented and nothing else: that the read builder's flag never reaches a predicate and vice versa, and that WithProjection rejects a name no casing can match. Move the one-byte bool rationale onto boolByte, where its four call sites can find it, and correct WithProjection's doc — "under either case mode" inverted the contract that the C side states as "under any case sensitivity".
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 this read-time 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
One switch name,
WithCaseSensitive, on each object that owns a name resolution:ReadBuilderfor projection,PredicateBuilderfor predicates. The split iscore's and the C ABI's, not Go's: the core resolves a column when the predicate is
built, so a read-builder flag cannot reach an already-built one. Python needs a
single switch only because its filter is a dict converted at
with_filtertime,while Go's
WithFiltertakes a resolved handle.Tablegains no method;PredicateBuilder.WithCaseSensitivereturns a copy. Theten predicates Go exposes now call the additive
paimon_predicate_*_with_case_sensitiveentry points, the default passingtrue.The six operators C gained in #523 but Go never bound stay out of scope.
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, and one
test pins that neither switch reaches the other.
API and Format
Two new Go methods, one name. No ABI, wire or storage change; the C symbols
already exist.
Documentation
One
go-binding.mdsection per half.