Hello all,

I am beginning to believe that the SqlKind field is being misused in Calcite by 
using it to denote custom function implementations (e.g. 
SqlKind.SUBSTR_BIG_QUERY).

I have filed an issue about function name resolution when using multiple 
libraries: https://issues.apache.org/jira/browse/CALCITE-6518. But I am having 
difficulties solving this issue fully.

The code that does name resolution for functions (in SqlUtil.lookupRoutine) 
expects that functions that are not standard are having the kind 
SqlKind.OTHER_FUNCTION. But this is not true for many functions that have been 
updated recently. If there are multiple matches for a function name, 
SqlUtil.lookupSubjectRoutine keeps under consideration only functions with the 
kind OTHER_FUNCTION.

If I am right, the real fix would be to remove all the newly introduced kinds.

I would appreciate a confirmation from someone who has been around long enough 
to know what SqlKind is supposed to represent.

Alternatively, we can make the SqlKind enum have multiple fields, one of which 
could be used to represent "OTHER_FUNCTION".

Thank you,
Mihai

Reply via email to