XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.0
    • Fix Version/s: None
    • Component/s: SQL
    • Labels:
      None

      Description

      The CASE clause is commonly used in SQL queries, but people can forget the trailing END. When a user queries such a statement, the error message is confusing. For example, the error message for

      SELECT (CASE WHEN a THEN b ELSE c) FROM a;
      

      is

      no viable alternative at input '(CASE WHEN a THEN b ELSE c)'(line 1, pos 33)
      

      which is misleading.
       

      One possible way to fix is to explicitly capture these statements in a grammar rule and print user-friendly error message such as

      missing trailing END for case clause
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              manifoldQAQ Yesheng Ma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: