Skip to content

Regression with NULLIF function in the multi-stage query engine #14207

@yashmayya

Description

@yashmayya
  • The NULLIF function works with the multi-stage query engine as of Pinot 1.2.0, but it doesn't work with the latest build off of master (queries will fail with the error No 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 SqlStdOperatorTable which has the SqlNullifFunction defined. By default, Calcite rewrites calls to NULLIF with equivalent calls to CASE WHEN. This is why the NULLIF function worked in the multi-stage engine even though Pinot doesn't have an actual implementation of the NULLIF function (since we do have a concrete implementation of CASE 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 for NULLIF, it was probably missed.
  • We need to add back the NULLIF operator to Pinot's operator table, and also add an actual scalar function implementation so that NULLIF can also be used in the single-stage query engine.

Metadata

Metadata

Assignees

Labels

bugmulti-stageRelated to the multi-stage query engine

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions