Skip to content

test: add lambda plan roundtrip tests#1

Merged
limameml merged 5 commits intolimameml:limame.malainine/add-lambda-supportfrom
substrait-io:vbarua/lambda-testing
Mar 11, 2026
Merged

test: add lambda plan roundtrip tests#1
limameml merged 5 commits intolimameml:limame.malainine/add-lambda-supportfrom
substrait-io:vbarua/lambda-testing

Conversation

@vbarua
Copy link

@vbarua vbarua commented Mar 10, 2026

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.

@Test
void defaultCollectionLoads() {
assertNotNull(DefaultExtensionCatalog.DEFAULT_COLLECTION);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a standalone test for loading collections was useful when debugging type parsing issues related to types in the list extension.

SqlBasicFunction.create(
"transform",
opBinding -> opBinding.getTypeFactory().createArrayType(opBinding.getOperandType(1), -1),
OperandTypes.family(SqlTypeFamily.ARRAY, SqlTypeFamily.ANY));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calcite has no equivalent of this function in it's built-in library, hence we define it here.

Copy link
Owner

@limameml limameml Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice I was thinking of defining it in ddsqlizer but it's more reasonable to do it here

@limameml limameml merged commit 2b5436c into limameml:limame.malainine/add-lambda-support Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants