-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-16288, KAFKA-16289: Fix Values convertToDecimal exception and parseString corruption #15399
KAFKA-16288, KAFKA-16289: Fix Values convertToDecimal exception and parseString corruption #15399
Conversation
…tToDecimal Signed-off-by: Greg Harris <greg.harris@aiven.io>
… element order Signed-off-by: Greg Harris <greg.harris@aiven.io>
assertEquals(Type.ARRAY, schema.type()); | ||
assertNull(schema.valueSchema()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it too difficult to also add an assertion about the parsed values in the array? Not a blocker, but seems nice to have if possible, especially since we don't cover anything except various representations of 1
in the other test above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Greg!
Signed-off-by: Greg Harris <greg.harris@aiven.io>
…16289-values-fixes
…16289-values-fixes
Test failures appear unrelated, and the tests pass for me locally. |
…arseString corruption (apache#15399) * KAFKA-16288: Prevent ClassCastExceptions for strings in Values.convertToDecimal * KAFKA-16289: Values inferred schemas for map and arrays should ignore element order Signed-off-by: Greg Harris <greg.harris@aiven.io> Reviewers: Chris Egerton <chrise@aiven.io>
…arseString corruption (apache#15399) * KAFKA-16288: Prevent ClassCastExceptions for strings in Values.convertToDecimal * KAFKA-16289: Values inferred schemas for map and arrays should ignore element order Signed-off-by: Greg Harris <greg.harris@aiven.io> Reviewers: Chris Egerton <chrise@aiven.io>
…arseString corruption (apache#15399) * KAFKA-16288: Prevent ClassCastExceptions for strings in Values.convertToDecimal * KAFKA-16289: Values inferred schemas for map and arrays should ignore element order Signed-off-by: Greg Harris <greg.harris@aiven.io> Reviewers: Chris Egerton <chrise@aiven.io>
See the descriptions of the tickets for full details:
These both represent breaking changes in behavior, but only when using incompatible-type arrays and maps, such as the ones included in the tests. Since the behavior of these is so opaque and silent corruption is possible with the bugs, we should change the behavior unconditionally.
Committer Checklist (excluded from commit message)