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

Query: investigate result discrepancy between sqlserver and sqlite for compex query with multiple nested subqueries and max #32559

Open
maumar opened this issue Dec 8, 2023 · 2 comments
Assignees
Milestone

Comments

@maumar
Copy link
Contributor

maumar commented Dec 8, 2023

Max_in_multi_level_nested_subquery, SqlServer and L2O return the same thing, Sqlite is different

@roji
Copy link
Member

roji commented Dec 8, 2023

@maumar assuming this is about the recent translation of Math.Max into GREATEST... When when I dug a bit more into the nullability around GREATEST/LEAST (#32458), I discovered that on SQL Server/PG, these functions ignore NULL (do not propagate), whereas on SQLite/MariaDB they propagate NULL as usual (so the result of the function is NULL if anything argument is NULL). I was planning on diving a bit more into this - it means we need to tweak the recently-merged support a bit.

Could this be the source of the discrepancy?

@maumar
Copy link
Contributor Author

maumar commented Dec 8, 2023

I think it's something else, there is no LEAST/GREATEST in the SqlServer translation, but will investigate properly. Only filed it for tracking purposes to ublock #32542

@ajcvickers ajcvickers added this to the Backlog milestone Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants