test: add lambda plan roundtrip tests#1
Merged
limameml merged 5 commits intolimameml:limame.malainine/add-lambda-supportfrom Mar 11, 2026
Merged
Conversation
Note that these had to be tweaked slightly because they were not entirely valid. This will be fixed in substrait-go.
vbarua
commented
Mar 10, 2026
| @Test | ||
| void defaultCollectionLoads() { | ||
| assertNotNull(DefaultExtensionCatalog.DEFAULT_COLLECTION); | ||
| } |
Author
There was a problem hiding this comment.
Having a standalone test for loading collections was useful when debugging type parsing issues related to types in the list extension.
vbarua
commented
Mar 10, 2026
| SqlBasicFunction.create( | ||
| "transform", | ||
| opBinding -> opBinding.getTypeFactory().createArrayType(opBinding.getOperandType(1), -1), | ||
| OperandTypes.family(SqlTypeFamily.ARRAY, SqlTypeFamily.ANY)); |
Author
There was a problem hiding this comment.
Calcite has no equivalent of this function in it's built-in library, hence we define it here.
Owner
There was a problem hiding this comment.
Nice I was thinking of defining it in ddsqlizer but it's more reasonable to do it here
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.
I was poking around your lambda PR and wanted to add some extra certainty to the implementation in the form of roundtrip tests going from Substrait plans containing lambdas, all the way to Calcite, and back. In the process I had to add a couple of things to your PR, but it was also nice and easy because you already did the hard work of adding the new func type.
@limameml take a look at these changes and see if they make sense. If they do, merge them into your PR and then I will finish reviewing your PR.