Open
Conversation
5dcec2d to
54d707c
Compare
nielspardon
requested changes
Mar 16, 2026
| /** Create a Custom dialect. Converts the function 'regexp_matches' to 'SIMILAR TO' */ | ||
| public static final SqlDialect customSqlDialect() { | ||
|
|
||
| return new SparkSqlDialect(SparkSqlDialect.DEFAULT_CONTEXT) { |
Member
There was a problem hiding this comment.
above you are writing it would be using a custom DuckDB dialect but here it's a SparkSqlDialect. which is it?
Contributor
Author
There was a problem hiding this comment.
do'h I've mixed up two different examples here.
correcting
examples/isthmus-api/src/main/java/io/substrait/examples/DynamicFnToSql.java
Outdated
Show resolved
Hide resolved
examples/isthmus-api/src/main/java/io/substrait/examples/DynamicFnToSql.java
Outdated
Show resolved
Hide resolved
examples/isthmus-api/src/main/java/io/substrait/examples/DynamicFnToSql.java
Outdated
Show resolved
Hide resolved
Comment on lines
+24
to
+25
| * <p>DuckDB used here supports the function `regexp_matches' as well as the SQL standard "SIMILAR | ||
| * TO" |
Member
There was a problem hiding this comment.
maybe we should be consistent with the quote characters here ` or "
examples/isthmus-api/src/main/java/io/substrait/examples/DynamicFnToSql.java
Outdated
Show resolved
Hide resolved
Signed-off-by: MBWhite <whitemat@uk.ibm.com>
54d707c to
5798502
Compare
Signed-off-by: MBWhite <whitemat@uk.ibm.com>
5798502 to
406a02c
Compare
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.
Adding a new example here to demonstrate how to use the Dynamic Function support; this was inspired by a real life usecase trying to work out how to do this!