-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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 <[email protected]>
… element order Signed-off-by: Greg Harris <[email protected]>
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!
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 <[email protected]> Reviewers: Chris Egerton <[email protected]>
…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 <[email protected]> Reviewers: Chris Egerton <[email protected]>
…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 <[email protected]> Reviewers: Chris Egerton <[email protected]>
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)