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.
We now verify the custom extensions defined in the extensions folder.
If they exist there, we properly add the extension to our plan and create a function signature in the format:
<function name>:<short_arg_type0>_<short_arg_type1>_..._<short_arg_typeN>
When consuming plans, we disregard this extra information. I guess it might only be useful in the context of executing functions rather than the operator, but I'm not yet certain.
I think the main thing missing is that there are no guarantees that we are not exporting functions that are either native to Substrait or defined in these extension YAML files. This might be something to explore in the future if a system that tries to consume DuckDB Plans actually needs these.
Finally, I've done a lot of fiddling with the auto-generated proto code to get type signatures but did not manage to obtain them. I'm currently getting these signatures by parsing debug info, which is pretty hacky. I will need to find a cleaner way of doing this.
Fixes: #65
As an example, a plan for the query:
where t is:
And the
sin
function, now defined in the Substrait extensions, looks like this: