Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.3.3
    • Fix Version/s: None
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None

      Description

      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'

        Activity

        Hide
        Miha Vrhovnik added a comment -

        We could say a duplicate of: DDC-2208

        Show
        Miha Vrhovnik added a comment - We could say a duplicate of: DDC-2208
        Hide
        Guilherme Blanco added a comment -

        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.

        Show
        Guilherme Blanco added a comment - 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.

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            vahid sohrabloo
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: