-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Description
- The
NULLIFfunction works with the multi-stage query engine as of Pinot 1.2.0, but it doesn't work with the latest build off ofmaster(queries will fail with the errorNo match found for function signature NULLIF). - This is an accidental regression from Refactor function registry for multi-stage engine #13573. Prior to that refactor, Pinot's operator table extended Calcite's
SqlStdOperatorTablewhich has the SqlNullifFunction defined. By default, Calcite rewrites calls toNULLIFwith equivalent calls toCASE WHEN. This is why theNULLIFfunction worked in the multi-stage engine even though Pinot doesn't have an actual implementation of theNULLIFfunction (since we do have a concrete implementation ofCASE WHEN). - However, the above linked PR updated Pinot's operator table to no longer extend Calcite's
SqlStdOperatorTable, and instead manually register all the operators that Pinot actually has support for. Since Pinot didn't have an actual implementation forNULLIF, it was probably missed. - We need to add back the
NULLIFoperator to Pinot's operator table, and also add an actual scalar function implementation so thatNULLIFcan also be used in the single-stage query engine.