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

Query with filter and aggregate hangs in planning phase

    XMLWordPrintableJSON

Details

    Description

      For the following query,

      SELECT  cust.custAddress, 
             lineitem.provider 
      FROM ( 
            SELECT cast(c_custkey AS bigint) AS custkey, 
                   c_address                 AS custAddress 
            FROM   cp.`tpch/customer.parquet` ) cust 
      LEFT JOIN 
        ( 
          SELECT DISTINCT l_linenumber, 
                 CASE 
                   WHEN l_partkey IN (1, 2) THEN 'Store1'
                   WHEN l_partkey IN (5, 6) THEN 'Store2'
                 END AS provider 
          FROM  cp.`tpch/lineitem.parquet` 
          WHERE ( l_orderkey >=20160101 AND l_partkey <=20160301) 
            AND   l_partkey IN (1,2, 5, 6) ) lineitem
      ON        cust.custkey = lineitem.l_linenumber 
      WHERE     provider IS NOT NULL 
      GROUP BY  cust.custAddress, 
                lineitem.provider 
      ORDER BY  cust.custAddress, 
                lineitem.provider;
      

      When run on today's master branch commit: 79a3c164c1df7a5d7a0b82574316b4a0b1c7593e, query just hangs there in the planning phase.

      Log shows that it stuck in Drill_Logical planning phase.

      Attachments

        Activity

          People

            jni Jinfeng Ni
            jni Jinfeng Ni
            Chun Chang Chun Chang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: