Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6835 Schema Provision using File / Table Function
  3. DRILL-7157

Wrap SchemaParsingException into UserException when creating schema

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.16.0
    • Component/s: None
    • Labels:

      Description

      When there is an error during schema parsing we should throw UserException but not system:

      apache drill>create or replace schema (col iint) for table dfs.tmp.text_table;
      Error: SYSTEM ERROR: SchemaParsingException: Line [1], position [5], offending symbol [@2,5:8='iint',<47>,1:5]: no viable alternative at input 'coliint'
      

      After changes exception will be the following:

      apache drill> create or replace schema (col iint) for table dfs.tmp.text_table;
      Error: PARSE ERROR: Line [1], position [5], offending symbol [@2,5:8='iint',<47>,1:5]: no viable alternative at input 'coliint'
      
      Schema: (col iint)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arina Arina Ielchiieva
                Reporter:
                arina Arina Ielchiieva
                Reviewer:
                Vova Vysotskyi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: