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

Missing partition by key in OVER clause causes RelOptPlanner$CannotPlanException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.0.0
    • None
    • None

    Description

      Since the two inputs to OVER clause are optional. Test that uses only order by clause with order by column results in CannotPlanException

      0: jdbc:drill:schema=dfs.tmp> select count(columns[3]) over ( order by columns[13]) from `airports.csv`;
      Error: SYSTEM ERROR: org.apache.calcite.plan.RelOptPlanner$CannotPlanException: Node [rel#6046:Subset#10.PHYSICAL.SINGLETON([]).[]] could not be implemented; planner state:
      
      Root: rel#6046:Subset#10.PHYSICAL.SINGLETON([]).[]
      Original rel:
      AbstractConverter(subset=[rel#6046:Subset#10.PHYSICAL.SINGLETON([]).[]], convention=[PHYSICAL], DrillDistributionTraitDef=[SINGLETON([])], sort=[[]]): rowcount = 69890.0, cumulative cost = {inf}, id = 6048
        DrillScreenRel(subset=[rel#6045:Subset#10.LOGICAL.ANY([]).[]]): rowcount = 69890.0, cumulative cost = {6989.0 rows, 6989.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 6044
          DrillProjectRel(subset=[rel#6043:Subset#9.LOGICAL.ANY([]).[]], EXPR$0=[$0]): rowcount = 69890.0, cumulative cost = {0.0 rows, 0.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 6042
            DrillProjectRel(subset=[rel#6041:Subset#8.LOGICAL.ANY([]).[]], $0=[$2]): rowcount = 69890.0, cumulative cost = {0.0 rows, 0.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 6040
              DrillWindowRel(subset=[rel#6039:Subset#7.LOGICAL.ANY([]).[]], window#0=[window(partition {} order by [1] range between UNBOUNDED PRECEDING and CURRENT ROW aggs [COUNT($0)])]): rowcount = 69890.0, cumulative cost = {69890.0 rows, 139780.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 6038
                DrillProjectRel(subset=[rel#6037:Subset#6.LOGICAL.ANY([]).[]], $0=[ITEM($0, 3)], $1=[ITEM($0, 13)]): rowcount = 69890.0, cumulative cost = {69890.0 rows, 559120.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 6036
                  DrillScanRel(subset=[rel#6035:Subset#5.LOGICAL.ANY([]).[]], table=[[dfs, tmp, airports.csv]], groupscan=[EasyGroupScan [selectionRoot=/tmp/airports.csv, numFiles=1, columns=[`columns`[3], `columns`[13]], files=[maprfs:///tmp/airports.csv]]]): rowcount = 69890.0, cumulative cost = {69890.0 rows, 69890.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 6014
      
      

      Attachments

        Issue Links

          Activity

            People

              jni Jinfeng Ni
              khfaraaz Khurram Faraaz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: