Repository navigation
Conversation
Compare types recursively while ignoring ROW field descriptions and IDs, preserving field names, order, nullability, and type parameters. Reuse the comparison for Kafka column contracts and cover metadata validation through unit tests and coordinator DDL integration tests. Fixes apache#4765 Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 0/146 AI-Contributed/UT: 0/290
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
Closes #4765. Part of #4185.
Kafka table schema validation currently mixes per-column type checks with a dedicated
_kafka_metadatacomparison. Consolidate these checks around expected types while preserving the existing mapping contract, and include the actual type in validation errors.Brief change log
DataTypeChecks.equalsIgnoreFieldDescriptionsAndIds, recursively comparing ROW, ARRAY, and MAP types while preserving field names, field order, nullability, and type parameters._kafka_valuevalidation.Tests
./mvnw -B verify spotless:check -pl fluss-kafka -am \ '-Dtest=Kafka*Test,Kafka*ITCase,ApiVersionsHandlerTest,DataTypeChecksTest' \ -Dsurefire.failIfNoSpecifiedTests=falseKafkaTableMappingITCasecases.DataTypeChecksTest(17) andKafkaTableSchemaTest(36) also passed. Counts do not add together repeated Surefire lifecycle executions.fluss-commontest cases (1 skipped, no failures/errors) and all 157 RPC cases (2 skipped, no failures/errors).git diff --check, Spotless, Checkstyle, and RAT passed for the validated reactor../mvnw -B verify spotless:checkwas attempted but did not complete:RemoteLogManagerTestremained inReplicaTestBase.setup, retryingZooKeeperClient.registerTable, for more than eight minutes. Two thread dumps confirmed the same setup path before the run was terminated. The remaining full-reactor tests are not claimed as passing.API and Format
Adds a type-comparison utility. No wire or storage format changes; the Kafka DDL schema contract is preserved. Type-validation error messages now include the actual type.
Documentation
No user documentation changes are needed for this validation refactor.
Generative AI disclosure
Codex was used to review, validate, and prepare this pull request from existing local changes.