Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3010

Convert bad command error messages into UserExceptions in SqlHandlers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 1.0.0
    • Metadata
    • None

    Description

      Currently SqlHandlers such as CreateTable or ViewHandler send the error messages as bad command records. Instead we should throw a UserException.

      0: jdbc:drill:zk=local> create table t1 as select * from cp.`region.json`;
      +------------+------------+
      |     ok     |  summary   |
      +------------+------------+
      | false      | Unable to create table. Schema [dfs.default] is immutable.  |
      +------------+------------+
      1 row selected (0.103 seconds)
      

      Instead it should be like:

      0: jdbc:drill:zk=10.10.30.143:5181> create table t1 as select * from cp.`region.json`;
      Error: PARSE ERROR: Unable to create or drop tables/views. Schema [dfs.default] is immutable.
      
      
      [Error Id: 3a92d026-3df7-4e8b-8988-2300463fa00b on centos64-30146.qa.lab:31010] (state=,code=0)
      

      Attachments

        1. DRILL-3010-1.patch
          92 kB
          Venki Korukanti

        Activity

          People

            vkorukanti Venki Korukanti
            vkorukanti Venki Korukanti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: