DRILL-1729: derive & infer result type for boolean returning custom functions so that optiq can validate and execute user queries seamlessly