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

Select * from join does not return required columns

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • None
    • None

    Description

      1. Select * from join does not return required columns

      select * from cp.`tpch/nation.parquet` n, cp.`tpch/region.parquet` r where n.n_regionkey = r.r_regionkey limit 2;

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

      *0 r_regionkey N_NATIONKEY N_NAME N_REGIONKEY N_COMMENT

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

      null 0 0 [B@6c7e90b9 0 [B@694f9954
      null 1 1 [B@68db8fcf 1 [B@26be94d1

      -------------------------------------------------------——————+

      In this case, RHS only has the join key column appear in the result. Also, it has *0 column in the output.

      2. Select T1.* from join returns unwanted columns

      select n.* from cp.`tpch/nation.parquet` n, cp.`tpch/region.parquet` r where n.n_regionkey = r.r_regionkey limit 2;

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

      R_REGIONKEY N_NATIONKEY N_NAME N_REGIONKEY N_COMMENT

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

      0 0 [B@3328c286 0 [B@38fb05a7
      1 1 [B@6830342a 1 [B@34b0e6d6

      ---------------------------------------------——————

      select r.* from cp.`tpch/nation.parquet` n, cp.`tpch/region.parquet` r where n.n_regionkey = r.r_regionkey limit 2;

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

      R_REGIONKEY R_NAME R_COMMENT N_REGIONKEY

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

      0 [B@997b44c [B@46bdee7f 0
      1 [B@5f74f821 [B@784e6f7c 1

      ---------------------------------——————+

      In this case, the join key column from the other table appears in the output, which is not correct.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: