fix(spec): reject changelog-producer on tables without primary keys - #670
Open
jackylee-ch wants to merge 1 commit into
Open
fix(spec): reject changelog-producer on tables without primary keys#670jackylee-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.
A non-
nonechangelog-produceron a table without primary keys was accepted atboth create and alter time. An append table has no merge step, so no changelog can
ever be produced: the option is persisted into the schema and then silently ignored
by the write path, which derives
input_changelogfrom the producer alone and neverreaches a compaction that could emit changelog files. Users get a table that claims
to produce a changelog and quietly does not. Java rejects this in
SchemaValidation#validateTableSchemawith "Can not set changelog-producer on tablewithout primary keys, please define primary keys."
Fix: add
validate_changelog_producer_requires_primary_keystoSchema::validate_final_schema, so it runs on both paths, as #660 arranged. Only anon-
NONEproducer is rejected — an append table may still spell the default outexplicitly, matching Java's
!= ChangelogProducer.NONEguard.No behavior change for any table that has primary keys, or for
changelog-producer=none.