> >> On Nov 15, 2013, at 1:42 AM, Yash Sharma <[email protected]> wrote: >> >> One idea is to have categorized precedence maps. Different maps for subsets >> of datatypes. Only allowed datatypes will be present in each submap. >> Other Idea is to have a separate small map for invalid/restricted type >> casts. Code will first check this map, only then it will go for >> implicit/explicit cast. This code can be put in the getCost() function in >> DrillFunctionHolder class.
FYI, this stuff is in Optiq already. Take a look at https://github.com/julianhyde/optiq/blob/master/core/src/main/java/org/eigenbase/sql/type/SqlTypeAssignmentRules.java. Julian
