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

Skip null checks where ANSI null-fallthrough still works #1340

Closed
deusaquilus opened this issue Feb 19, 2019 · 0 comments · Fixed by #1341
Closed

Skip null checks where ANSI null-fallthrough still works #1340

deusaquilus opened this issue Feb 19, 2019 · 0 comments · Fixed by #1341

Comments

@deusaquilus
Copy link
Collaborator

Version: 3.0.2-SNAPSHOT
Module: quill-core
Database: all

In #1302, we introduced explicit null checks for Option operations exists, forall, map, and flatMap because when case statements were created inside, the ANSI null-fallthrough that was relied upon would not work correctly. Also, with the introduction of the Oracle module in #1295, string concatonation itself could not be relied upon to be ANSI-compliant (i.e. since Oracle does not have null-fallthrough for string concatonation).

The fact remains however, that whenever there is an instance of Option exists, forall, map, or flatMap, we only actually need to do explicit null-checking when a case statement (or non-ansi concat). Since extra null-checks make queries hard to understand, and decrease performance, it is worthwhile to actually check the body of exists, forall, map, or flatMap and see if there are case-statements or non-ansi concats inside and if there are not, fall back to the old behavior that relies on the ansi nulls.

@getquill/maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant