> We could declare our function in a virtual model instead but that will have to wait a while as we currently build our VDB completely programmatically and don't have an easy way to declare virtual models.
That can be done via ddl in the vdb.xml or a custom metadatarepository, but I can see how that would be less convienent.
> For now, we can just declare the function to be CANNOT_PUSHDOWN.
That was part of the logic behind the simplifying assumption. That is there still is a way for a translator to declare a purely virtual function - see also the MetadataFactory.addFunction(String, Method) that largely automates that process.
> Does this mean that we could call f.setVirtual(true) during getMetadata() and achieve the desired PUSHDOWN_ALLOWED behavior? If so, should the FunctionMethod object default virtual to true when pushdown is set to PUSHDOWN_ALLOWED? Is PUSHDOWN_ALLOWED & virtual=false a meaningful state?
The virtual or (external vs. non-external concept) isn't a simple boolean for functions. It's something that is inferred from the three pushdown types of allow, not allowed, and must - and whether or not the function has a java class/method set. Thus it's something that need a little more rationalization.