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

Star is not expanded correctly in create view if view fields are specified

    XMLWordPrintableJSON

Details

    Description

      0: jdbc:drill:schema=dfs> select * from t2 limit 1;
      +------------+------------+------------+
      |     a2     |     b2     |     c2     |
      +------------+------------+------------+
      | 0          | zzz        | 2014-12-31 |
      +------------+------------+------------+
      1 row selected (0.065 seconds)
      

      We get an error, even though table t2 has 3 columns:

      0: jdbc:drill:schema=dfs> create view v2(a2, b2, c2) as select * from t2;
      +------------+------------+
      |     ok     |  summary   |
      +------------+------------+
      | false      | View's field list and View's query field list have different counts. |
      +------------+------------+
      1 row selected (0.038 seconds)
      

      Attachments

        Activity

          People

            jni Jinfeng Ni
            vicky Victoria Markman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: