DDC-2444: NULL IN CASE WHEN #3160

Closed
doctrinebot opened this Issue May 12, 2013 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user vahid4134:

Hi
In DQL when i use NULL IN "CASE WHEN" like this
"AVG(CASE WHEN g.speed > 0 THEN g.speed ELSE NULL END)"
Throw this expestion
Unexpected 'NULL'

@doctrinebot

Comment created by mvrhov:

We could say a duplicate of: DDC-2208

@doctrinebot

Comment created by @guilhermeblanco:

After further investigation, JPA 2.0 and 2.1 do not support NULL as part of ScalarExpression.
There are many underlying problems by adding this straight to ScalarExpression, such as the example I showed.
I don't think supporting this will bring benefits, but too many headaches.
As a workaround, create your own function that generates "NULL" as SQL. It would work perfectly here.
Closing the PR as we will not support it.

@doctrinebot

Issue was closed with resolution "Won't Fix"

@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment