Hi all, I'm currently trying to implement Calcite on my already existing SQL syntax. I created my own SqlOperatorTable and I overrode the lookupOperatorOverloads method. And things are working pretty well. But....
I have a situation with the "||" operator. In my syntax, it can be used as either "concat" or "or". I thought this was gonna be an easy task within the framework. According to my syntax rules (for better or for worse), if both parameters are boolean, it should be an "or". Otherwise, it should be a "concat". My plan was to return both operators in the lookupOperatorOverloads operator list and let the Calcite framework do its thing. That method does not have access to the parametrs. But I did see a filterRoutinesByParameterTypeAndName method which would do exactly what I want! However, the first check in the method is "is it an SqlSyntax.FUNCTION", which...it is not, it's a BINARY. So I'm unable to use this filter and I don't have a way to choose based on parameters. I have to use 2 different operators because the precedence of OR is 22 and CONCAT is 60. I hope this is enough of an explanation of my problem. Any suggestions on how to solve this? I have my own Parser.jj that I'm using so I can theoretically manipulate code there, but I'd like to keep manipulations there to a minimum. Also, is there any reason why the filter routine only wants to filter functions and not binary operators? Thanks in advance, Steve