Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1230

Add SQLSTATE reference data as enum SqlState

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: avatica-1.8.0
    • Component/s: avatica
    • Labels:
      None

      Description

      The SQL standard defines error codes for the standard things that can go wrong while processing SQL. If client applications are written to expect those error codes they can make their behavior uniform across databases.

      Avatica can help by defining the standard codes in a new enum org.apache.calcite.avatica.SqlState.

        Issue Links

          Activity

          Hide
          julianhyde Julian Hyde added a comment -

          I have implemented enum SqlState on https://github.com/julianhyde/calcite/tree/1230-sql-state. Can someone please review?

          Show
          julianhyde Julian Hyde added a comment - I have implemented enum SqlState on https://github.com/julianhyde/calcite/tree/1230-sql-state . Can someone please review?
          Hide
          elserj Josh Elser added a comment -

          +1 LGTM – somewhat related, is there a canonical location for the standards that are freely available? I feel like I always struggle to find a current standards doc (usually running into a pay-wall at iso.org).

          Show
          elserj Josh Elser added a comment - +1 LGTM – somewhat related, is there a canonical location for the standards that are freely available? I feel like I always struggle to find a current standards doc (usually running into a pay-wall at iso.org).
          Hide
          julianhyde Julian Hyde added a comment - - edited

          The standards are behind a paywall, yes. Search for the drafts, e.g. 32N2311T-text_for_ballot-CD_9075-2.pdf and you should find something. Then I recommend you keep a copy on your hard drive.

          Also see the link in PHOENIX-1768.

          Show
          julianhyde Julian Hyde added a comment - - edited The standards are behind a paywall, yes. Search for the drafts, e.g. 32N2311T-text_for_ballot-CD_9075-2.pdf and you should find something. Then I recommend you keep a copy on your hard drive. Also see the link in PHOENIX-1768 .
          Hide
          julianhyde Julian Hyde added a comment -

          Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/6bc34d03.

          There is one more commit in https://github.com/julianhyde/calcite/tree/1230-sql-state, to deprecate SqlStateCodes. We need to apply that in Calcite after Avatica 1.8.0 is released.

          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/6bc34d03 . There is one more commit in https://github.com/julianhyde/calcite/tree/1230-sql-state , to deprecate SqlStateCodes. We need to apply that in Calcite after Avatica 1.8.0 is released.

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              julianhyde Julian Hyde
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development