Repository navigation
Don't send all-NULL rows in Scalar LLM functions to the provider - #297
Merged
Merged
Conversation
This was referenced Sep 24, 2026
A row with no verdict was coerced to "true" and passed the filter. It is now SQL NULL, so WHERE drops it and a projection shows NULL.
iZarrios
force-pushed
the
llm-filter-null-results
branch
from
September 28, 2026 19:27
c7e6ae6 to
ed15893
Compare
queryproc
reviewed
Sep 29, 2026
| ## 3. Output | ||
|
|
||
| The function returns a **BOOLEAN** value (`TRUE` or `FALSE`), indicating whether the row satisfies the condition specified in the prompt. | ||
| The function returns a **BOOLEAN** value: `TRUE` or `FALSE`, indicating whether the row satisfies the condition specified in the prompt, or `UNKNOWN` (SQL `NULL`) when there is no verdict for the row. A row whose context columns are all `NULL` is not sent to the model and returns `UNKNOWN`. An ordinary `WHERE` keeps only `TRUE` rows, so `UNKNOWN` rows are left out. |
Member
There was a problem hiding this comment.
This line: An ordinary "WHERE" keeps only "TRUE" rows, so "UNKNOWN" rows are left out is unnecessary and is expected SQL behaviour: Predicates including JOIN ON pass or match only on TRUE.
queryproc
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.