julianhyde/optiq — pull request #79 by mehant (2013-11-06 06:55:42+00:00)
Title: Modify type checkers to accept 'ANY' type

I discussed some of the approaches we could use to get rid of the 'cast' from the Drill SQL with Jacques and arrived at the conclusion that modifying checkOperandType() to allow 'ANY' seems like the better approach.

Modifying SqlTypeStrategies seems like a lot more intrusive and the amount of permutations we would need to use for every operator makes it messy.

Seems to me that since Optiq supports the notion of 'ANY' type inherently, its type checkers should allow 'ANY' type to work well with other types (including 'ANY' itself). So all the operand type checkers should/can be aware of this type.

I've modified a couple of functions to just showcase how I was planning to proceed, haven't added tests or anything. This is an exercise to make sure the approach we are taking is fine. Let us know your thoughts.