Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-14857

Table/Database Name Validation in SessionCatalog

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 2.0.0
    • None
    • SQL

    Description

      We need validate the database/table names before storing these information in `ExternalCatalog`.

      For example, if users use `backstick` to quote the table/database names containing illegal characters, these names are allowed by Spark Parser, but Hive metastore does not allow them. We need to catch them in SessionCatalog and issue an appropriate error message.
      ```
      CREATE TABLE `tab:1` ...
      ```

      This PR enforces the name rules of Spark SQL for `table`/`database`/`view`: `only can contain alphanumeric and underscore characters.` Different from Hive, we allow the names with starting underscore characters.

      The validation of function/column names will be done in a separate JIRA.

      Attachments

        Issue Links

          Activity

            People

              smilegator Xiao Li
              smilegator Xiao Li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: