substrait-io / substrait-java

Apache License 2.0
72 stars 70 forks source link

feat(isthmus): add up-converting signature matchers, and coerce types to match #226

Closed bvolpato closed 4 months ago

bvolpato commented 5 months ago

My attempt to take a stab at the TODO in the code:

  // TODO: define up-converting matchers.

We've got here since we noticed that functions that have list<any1>, any1 arguments wouldn't match list<string>, string without implementing a proper CallConverter as adapter:

I've kept the leastRestrictive logic intact, but added another fallback matcher that checks if all arguments will match (using the existent isMatch logic, which relies on IgnoreNullableAndParameters internally).

--

Let me know if there are any concerns or thoughts on how to make this better.