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

Can not plan exception when over clause is empty

    Details

      Description

      With all currently supported window functions:

      0: jdbc:drill:schema=dfs> select c_integer, max(c_integer) over() from j7;
      Error: SYSTEM ERROR: org.apache.calcite.plan.RelOptPlanner$CannotPlanException: Node [rel#4414:Subset#7.PHYSICAL.SINGLETON([]).[]] could not be implemented; planner state:
      
      Root: rel#4414:Subset#7.PHYSICAL.SINGLETON([]).[]
      Original rel:
      AbstractConverter(subset=[rel#4414:Subset#7.PHYSICAL.SINGLETON([]).[]], convention=[PHYSICAL], DrillDistributionTraitDef=[SINGLETON([])], sort=[[]]): rowcount = 7680.0, cumulative cost = {inf}, id = 4416
        DrillScreenRel(subset=[rel#4413:Subset#7.LOGICAL.ANY([]).[]]): rowcount = 7680.0, cumulative cost = {768.0 rows, 768.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 4412
          DrillProjectRel(subset=[rel#4411:Subset#6.LOGICAL.ANY([]).[]], c_integer=[$0], EXPR$1=[$1]): rowcount = 7680.0, cumulative cost = {0.0 rows, 0.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 4410
            DrillProjectRel(subset=[rel#4409:Subset#5.LOGICAL.ANY([]).[]], c_integer=[$1], $1=[$2]): rowcount = 7680.0, cumulative cost = {0.0 rows, 0.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 4408
              DrillWindowRel(subset=[rel#4407:Subset#4.LOGICAL.ANY([]).[]], window#0=[window(partition {} order by [] range between UNBOUNDED PRECEDING and UNBOUNDED FOLLOWING aggs [MAX($1)])]): rowcount = 7680.0, cumulative cost = {7680.0 rows, 15360.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 4406
                DrillScanRel(subset=[rel#4405:Subset#3.LOGICAL.ANY([]).[]], table=[[dfs, subqueries, j7]], groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:///drill/testdata/subqueries/j7]], selectionRoot=/drill/testdata/subqueries/j7, numFiles=1, columns=[`*`]]]): rowcount = 7680.0, cumulative cost = {7680.0 rows, 7.68E7 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 4395
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amansinha100 Aman Sinha
                Reporter:
                vicky Victoria Markman
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: