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

Select from view created from a view returns NPE

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=699851b

      I created a view from a view within the same schema. When I performed a select from the new view, I got a NPE.

      0: jdbc:drill:schema=dfs> create view student_v1 as select * from student_v;
      ----------------------+

      ok summary

      ----------------------+

      true View 'student_v1' created successfully in 'dfs.default' schema

      ----------------------+
      1 row selected (0.683 seconds)

      0: jdbc:drill:schema=dfs> select * from student_v1 limit 5;
      message: "Failure while parsing sql. < NullPointerException"

      Here is the definition of the new view:
      [root@qa-node56 ~]# hadoop fs -cat /drill/testdata/p1tests/student_v1.view.drill
      {
      "name" : "student_v1",
      "sql" : "SELECT *\nFROM `student_v`",
      "fields" : [

      { "name" : "student_id", "type" : "INTEGER" }

      ,

      { "name" : "name", "type" : "ANY" }

      ,

      { "name" : "age", "type" : "INTEGER" }

      ,

      { "name" : "gpa", "type" : "DECIMAL", "precision" : 4, "scale" : 0 }

      ,

      { "name" : "student_num", "type" : "BIGINT" }

      ,

      { "name" : "create_date", "type" : "TIMESTAMP" }

      ]

      Attachments

        Activity

          People

            vkorukanti Venki Korukanti
            knguyen Krystal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: