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

Hash Join returns incorrect data types when joining subqueries with limit 0

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.14.0
    • Component/s: None
    • Labels:

      Description

      PreparedStatement for query

      SELECT l.l_quantity, l.l_shipdate, o.o_custkey
      FROM (SELECT * FROM cp.`tpch/lineitem.parquet` LIMIT 0) l
          JOIN (SELECT * FROM cp.`tpch/orders.parquet` LIMIT 0) o 
          ON l.l_orderkey = o.o_orderkey
      LIMIT 0
      

       is created with wrong types (nullable INTEGER) for all selected columns, no matter what their actual type is. This behavior reproduces with hash join only and is very likely to be caused by DRILL-6027 as the query works fine before this feature was implemented.

      To reproduce the problem you can put the aforementioned query into TestPreparedStatementProvider#joinOrderByQuery() test method.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                timothyfarkas Timothy Farkas
                Reporter:
                KazydubB Bohdan Kazydub
                Reviewer:
                Boaz Ben-Zvi
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: