Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yashmayya opened this issue Oct 10, 2024 · 0 comments
Closed

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

yashmayya opened this issue Oct 10, 2024 · 0 comments
Assignees
Labels
bug multi-stage Related to the multi-stage query engine

Comments

@yashmayya
Copy link
Collaborator

  • 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.
@yashmayya yashmayya added bug multi-stage Related to the multi-stage query engine labels Oct 10, 2024
@yashmayya yashmayya self-assigned this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug multi-stage Related to the multi-stage query engine
Projects
None yet
Development

No branches or pull requests

1 participant