feat(isthmus): true, false, distinct comparator scalar fn mappings#597
Merged
andrew-coleman merged 1 commit intosubstrait-io:mainfrom Nov 10, 2025
Merged
feat(isthmus): true, false, distinct comparator scalar fn mappings#597andrew-coleman merged 1 commit intosubstrait-io:mainfrom
andrew-coleman merged 1 commit intosubstrait-io:mainfrom
Conversation
andrew-coleman
approved these changes
Nov 10, 2025
vbarua
reviewed
Dec 1, 2025
| @CsvSource({"int_a, int_b", "int_b, int_a", "double_a, double_b", "double_b, double_a"}) | ||
| void is_distinct_from(String left, String right) throws Exception { | ||
| String query = String.format("SELECT (%s IS DISTINCT FROM %s) FROM numbers", left, right); | ||
| assertSqlSubstraitRelRoundTrip(query, CREATES); |
Member
There was a problem hiding this comment.
Minor comment looking at this from the future. This doesn't actually test the IS DISTINCT FROM mapping because a query like
SELECT (int_a IS DISTINCT FROM int_b) FROM numbersgets processed into the following Calcite representation
LogicalProject(EXPR$0=[AND(OR(IS NOT NULL($0), IS NOT NULL($1)), IS NOT TRUE(=($0, $1)))])
LogicalTableScan(table=[[NUMBERS]])
I only noticed this because I was poking around updating some tests. The same thing happens with IS NOT DISTINCT FROM.
Contributor
Author
There was a problem hiding this comment.
Thanks for bringing this to my attention @vbarua! I'll take a look and rectify this tomorrow morning.
Contributor
Author
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.
is_true,is_false,is_not_true,is_not_falseandis_distinct_fromfunctions inFunctionMappings.javaComparisonFunctionsTest.java