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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 1.14.0
    • None

    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

              timothyfarkas Timothy Farkas
              bohdan Bohdan Kazydub
              Boaz Ben-Zvi Boaz Ben-Zvi
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: