fix ipv4_parse function return type in SQL to be bigint instead of integer#16942
Merged
gianm merged 2 commits intoapache:masterfrom Aug 22, 2024
Merged
fix ipv4_parse function return type in SQL to be bigint instead of integer#16942gianm merged 2 commits intoapache:masterfrom
gianm merged 2 commits intoapache:masterfrom
Conversation
gianm
approved these changes
Aug 22, 2024
hevansDev
pushed a commit
to hevansDev/druid
that referenced
this pull request
Aug 29, 2024
…teger (apache#16942) * fix ipv4_parse function return type in SQL to be bigint instead of integer * fix default value mode
edgar2020
pushed a commit
to edgar2020/druid
that referenced
this pull request
Sep 5, 2024
…teger (apache#16942) * fix ipv4_parse function return type in SQL to be bigint instead of integer * fix default value mode
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.
Fixes inconsistency in
IPV4_PARSEfunction SQL return type, which prior to this PR was specified asINTEGERwhile the native layer usesLONG. Because of this, something likeipv4_parse('192.168.0.1')would return -1062731775 since java only has signed integers, while the long number of the native layer is 3232235521.We could probably consider casting the negative arguments in the native layer into an int and then the bits back into a long to try to turn something like -1062731775 into 3232235521 so it isn't discarded as a null, but I didn't make that change at this time since there would be some performance cost to it, and I'm not sure if it should work anyway...