Support a load_errors sink in the (relations ...) CSV loading form - #272
Open
hbarthels wants to merge 1 commit into
Open
Support a load_errors sink in the (relations ...) CSV loading form#272hbarthels wants to merge 1 commit into
hbarthels wants to merge 1 commit into
Conversation
hbarthels
force-pushed
the
hb-relations-load-errors
branch
from
July 27, 2026 16:03
3077016 to
880c191
Compare
Add an optional trailing `(load_errors :name)` clause to the generalized
`(relations ...)` loading form, naming the relation that collects rows which
fail to load:
(relations
(keys (column "id" INT))
(relation :wide
(column "label" STRING)
(column "ratio" FLOAT))
(load_errors :my_load_errors))
The load-errors relation has a loader-determined schema that differs from the
declared keys and per-relation value columns, so it is called out as its own
clause rather than being another target relation.
Backed by a presence-tracked `optional RelationId load_errors` on
`TargetRelations`, so an absent sink is distinct from a default-valued one.
The clause is accepted after both plain targets and CDC insert/delete deltas.
Regenerates the protobuf bindings, parsers, and pretty printers for all three
SDKs, and extends the Julia equality/hashing for `TargetRelations` to cover
the new field.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
hbarthels
force-pushed
the
hb-relations-load-errors
branch
from
July 28, 2026 13:38
880c191 to
6bc1804
Compare
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.
Summary
Adds an optional trailing
(load_errors :name)clause to the generalized(relations ...)CSV loading form, naming the relation that collects rows which fail to load:The load-errors relation has a loader-determined schema that differs from the declared keys and the per-relation value columns. Making it its own clause — rather than another
(relation ...)— keeps that difference explicit at the syntax level.Changes
optional RelationId load_errors = 5onTargetRelations. Presence-tracked, so "no sink" is distinct from a default-valued one. Additive —buf breakingagainstmainis clean.load_errorsnonterminal, optional trailing element oftarget_relations. Accepted after both plain targets and CDC insert/delete deltas. No grammar conflicts — the generator's multi-token lookahead distinguishes("relationfrom("load_errors.TargetRelations==/isequal/hashto coverload_errors(on top of thesynthetic_keyfix in Include synthetic_key in TargetRelations equality and hashing #271).Tests
relations_load_errorsandrelations_load_errors_cdc(the latter also exercising(keys synthetic)) — with.bin, pretty, and pretty-debug snapshots.Full suite green: meta 817, Python 855, Julia 174 test items, Go ok.
Note on diff size
Most of the line count is regenerated parser/printer output across the three SDKs — same shape as #269. The hand-written changes are confined to
proto/relationalai/lqp/v1/logic.proto,meta/src/meta/grammar.y, the Julia equality files, and the tests.🤖 Generated with Claude Code