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

Creating a view with duplicate column names should fail or give a warning to the user

    XMLWordPrintableJSON

Details

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

    Description

      git.commit.id.abbrev=4d398ed

      View DDL :

      create view v1 as select pageRank, pageRank  from `/dfs/parquet/rankings`; 
      

      The above view creation succeeds and drill silently renames the columns. Postgres does not allow this behavior.

      Below is the description of the view

      describe v1;
      +-------------+------------+-------------+
      | COLUMN_NAME | DATA_TYPE  | IS_NULLABLE |
      +-------------+------------+-------------+
      | pageRank    | ANY        | NO          |
      | pageRank0   | ANY        | NO          |
      +-------------+------------+-------------+
      

      In most cases the reason someone would create such a view is by mistake. So we should either not allow it or give a warning to the user in such situations

      Attachments

        1. DRILL-2598-1.patch
          14 kB
          Venki Korukanti

        Activity

          People

            vkorukanti Venki Korukanti
            rkins Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: