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
Unexpected result when using LTRIM
with NULL
as second argument
#15527
Labels
bug
Clear identification of incorrect behaviour
Comments
Thanks for reporting @suyZhong. As you mentioned, I think the bug here may be
since we try to achieve Postgres compatibility if possible. |
jeeminso
added
bug
Clear identification of incorrect behaviour
and removed
triage
An issue that needs to be triaged by a maintainer
labels
Feb 8, 2024
matriv
added a commit
that referenced
this issue
Feb 8, 2024
Return `NULL` not only if the input string to trim is `NULL`, but also if the `trimmingText` argument of the functions is `NULL`, thus complying with PostgreSQL behaviour. Fixes: #15527
matriv
added a commit
that referenced
this issue
Feb 8, 2024
Return `NULL` not only if the input string to trim is `NULL`, but also if the `trimmingText` argument of the functions is `NULL`, thus complying with PostgreSQL behaviour. Fixes: #15527
matriv
added a commit
that referenced
this issue
Feb 8, 2024
Return `NULL` not only if the input string to trim is `NULL`, but also if the `trimmingText` argument of the functions is `NULL`, thus complying with PostgreSQL behaviour. Fixes: #15527
matriv
added a commit
that referenced
this issue
Feb 8, 2024
Return `NULL` not only if the input string to trim is `NULL`, but also if the `trimmingText` argument of the functions is `NULL`, thus complying with PostgreSQL behaviour. Fixes: #15527
mergify bot
pushed a commit
that referenced
this issue
Feb 8, 2024
Return `NULL` not only if the input string to trim is `NULL`, but also if the `trimmingText` argument of the functions is `NULL`, thus complying with PostgreSQL behaviour. Fixes: #15527
Thx for reporting @suyZhong ! The issue has been fixed and will be available with the next hotfix release. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CrateDB version
CrateDB 5.7.0-SNAPSHOT 4d4d160
CrateDB setup information
Manual build following the instructions here: https://github.com/crate/crate/blob/master/devs/docs/basics.rst
Problem description
Consider the test case below. It is unexpected that the second query returns
TRUE
, because there's oneNULL
value in the function argument. Still, if it is expected, the third query should returnNULL
, as the result of theWHERE
predicate isTRUE
.RTRIM
also shares the same issue. Have tested #15498 on this version and it worked as expected.Steps to Reproduce
Actual Result
As mentioned above
Expected Result
The second query should return
NULL
, otherwise the thrid query should returnNULL
The text was updated successfully, but these errors were encountered: