All the variants of Negative DrillFuncHolder are supposed to be deterministic. However, when they are being registered into DrillOperatorTable, there is a if-statement:
https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillFunctionRegistry.java#L116 which claims DrillFuncHolder being non-deterministic when return type is Interval. Why it is necessary to have this if-condition? ------------------------- Making DrillFuncHolder non-deterministic will prevent partition-pruing or constant folding from happening.