fix complex_decode_base64 function, add SQL bindings#13332
Merged
clintropolis merged 2 commits intoapache:masterfrom Nov 10, 2022
Merged
fix complex_decode_base64 function, add SQL bindings#13332clintropolis merged 2 commits intoapache:masterfrom
clintropolis merged 2 commits intoapache:masterfrom
Conversation
rohangarg
approved these changes
Nov 9, 2022
Member
rohangarg
left a comment
There was a problem hiding this comment.
Thanks a lot for the changes @clintropolis ! LGTM % comments
5 tasks
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.
Description
Fixes some bugs with the
complex_decode_base64function, which was basically broken before this PR for a few reasons, and migrates it to being implemented as anExprMacroinstead of aFunction, so that the literal arguments can be computed externally to the function instead of every evaluation. This involves a slight adjustment toExprMacroTableto add the concept of built-ins to make it a bit easier to add macros.This PR also wires
complex_decode_base64up to SQL, previously it was only a native expression. I have purposefully still not documented this function yet to save room for future adjustments and determining the best way to position this functionality, since its use cases are currently a bit limited.The improvements do allow some pretty funny/absurd things to work now, such as round-tripping complex types through JSON serialization and back into complex types all in the same expression as shown in one of the tests added:
😜
This PR has: