Hi,

I'm looking into adding additional functionality to the Druid adapter, and will 
need to somehow change the behaviour of calcite's validation logic (either at 
the adapter level, or the core level). I was wondering if there was an existing 
way for an adapter to participate in SQL validation (specifically function type 
checking). As far as I can tell, the only part of an adapter that calcite is 
aware of during validation are the table factory classes, which end up 
returning a table that are stored inside of a schema. 

If such functionality does not currently exist, what would be the best way to 
approach this? Essentially i'm trying to do type checking on aggregate 
functions with the help of information stored inside DruidQuery/DruidTable. At 
the moment I'm thinking the best way might be to add another JDBC string 
parameter specifying a class that can assist calcite in validation. 

Another approach might be to push the logic into the adapter entirely (as a 
rule for example) and then throw an exception when something fails validation. 
This approach is more hacky, but it might also be feasible.

If anyone has experience in implementing something similar to this and/or 
calcite's validation code in general i'd love to hear your thoughts.

Thanks,
Zain.   

Reply via email to