Skip to content

Conversation

@asuriy
Copy link
Contributor

@asuriy asuriy commented Nov 19, 2025

-Added mappings for STARTS_WITH, ENDS_WITH, CONTAINS and POSITION to FunctionMappings.java
-Added extra libraries to enable the included operators in SubstraitOperatorTable.java
-Added passing tests to StringFunctionTest.java including STARTSWITH, ENDSWITH, STRPOS and literals

@asuriy asuriy marked this pull request as draft November 19, 2025 13:51
@asuriy asuriy marked this pull request as ready for review November 19, 2025 14:23
@asuriy asuriy marked this pull request as draft November 19, 2025 14:37
@asuriy asuriy force-pushed the main branch 2 times, most recently from fe03114 to 961bda4 Compare November 19, 2025 16:40
@asuriy asuriy marked this pull request as ready for review November 19, 2025 16:41
Copy link
Member

@bestbeforetoday bestbeforetoday left a comment

Choose a reason for hiding this comment

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

The additional SQL function names I suggested testing already work with the code you had previously since they are Calcite SQL aliases and resolve to the same Calcite Rel. For example, both the SQL ENDS_WITH and ENDSWITH result in the Calcite ENDS_WITH Rel node. This means that your mapping from Calcite ENDS_WITH to Substrait ends_with works for both SQL variants with no special handling in our code required. It does mean that when converting Substrait ends_with back to SQL you always get ENDS_WITH, even if the input SQL used ENDSWITH, but that is fine since they are equivalent. Calcite will deal with mapping its Rel representation to the correct SQL form for a target execution engine.

In summary, the only changes needed were the additions to the testing coverage. The implementation code was fine so the extra changes made can be removed. See the inline comments with suggestions that (if they look OK to you) you should be able to apply to take you back to the minimal changes required.

@asuriy asuriy changed the title feat(isthmus): mapping of positional scalar fns including aliases feat(isthmus): mapping of positional scalar fns Nov 19, 2025
@bestbeforetoday bestbeforetoday merged commit 96541a9 into substrait-io:main Nov 20, 2025
12 checks passed
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