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

Select returns null for non pivot fields with a nested select

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.5.0
    • Execution - Data Types
    • None

    Description

      Take two simple csv files:

      t1.csv:
      ID,Name,Lastname
      9711942,name0,last0
      9707867,name1,last1

      t2.csv
      ID,Case Number
      9711942,HX362083
      9707867,HX357851

      The following queries return:
      select columns[0], columns[1], columns[2]
      FROM dfs.`/path/to/t1.csv`;
      --------------------------------

      ID Name Lastname
      9711942 name0 last0
      9707867 name1 last1

      --------------------------------

      SELECT columns[0], columns[1] FROM dfs.`/path/to/t2.csv`;
      ----------------------+

      ID Case Number
      9711942 HX362083
      9707867 HX357851

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

      This one returns all the fields null except the pivot field
      select columns[0], columns[1], columns[2]
      FROM dfs.`/path/to/t1.csv`
      where columns[0] in
      (SELECT columns[0] FROM dfs.`/path/to/t2.csv`);

      --------------------------------

      ID null null
      9711942 null null
      9707867 null null

      --------------------------------

      Attachments

        1. DRILL-1295.patch
          6 kB
          Mehant Baid

        Activity

          People

            DrillCommitter DrillCommitter
            hgunes Hanifi Gunes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: