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

Reading emtpy Parquet file failes with java.lang.IllegalArgumentException

    XMLWordPrintableJSON

    Details

      Description

      When querying a Parquet file that has a schema but no rows the Drill Server will fail with the below
      This looks similar to DRILL-3557

      {{ParquetMetaData{FileMetaData{schema: message TRANSACTION_REPORT {
        required int64 MEMBER_ACCOUNT_ID;
        required int64 TIMESTAMP_IN_HOUR;
        optional int64 APPLICATION_ID;
      }
      , metadata: {}}}, blocks: []}
      
      Caused by: java.lang.IllegalArgumentException: MinorFragmentId 0 has no read entries assigned
              at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) ~[guava-14.0.1.jar:na]
              at org.apache.drill.exec.store.parquet.ParquetGroupScan.getSpecificScan(ParquetGroupScan.java:707) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.store.parquet.ParquetGroupScan.getSpecificScan(ParquetGroupScan.java:105) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.planner.fragment.Materializer.visitGroupScan(Materializer.java:68) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.planner.fragment.Materializer.visitGroupScan(Materializer.java:35) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.physical.base.AbstractGroupScan.accept(AbstractGroupScan.java:60) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.planner.fragment.Materializer.visitOp(Materializer.java:102) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.planner.fragment.Materializer.visitOp(Materializer.java:35) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitProject(AbstractPhysicalVisitor.java:77) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.physical.config.Project.accept(Project.java:51) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.planner.fragment.Materializer.visitStore(Materializer.java:82) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.planner.fragment.Materializer.visitStore(Materializer.java:35) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitScreen(AbstractPhysicalVisitor.java:195) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.physical.config.Screen.accept(Screen.java:97) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.planner.fragment.SimpleParallelizer.generateWorkUnit(SimpleParallelizer.java:355) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.planner.fragment.SimpleParallelizer.getFragments(SimpleParallelizer.java:134) ~[drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.work.foreman.Foreman.getQueryWorkUnit(Foreman.java:518) [drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.work.foreman.Foreman.runPhysicalPlan(Foreman.java:405) [drill-java-exec-1.5.0.jar:1.5.0]
              at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:926) [drill-java-exec-1.5.0.jar:1.5.0]
      

        Attachments

        1. no_rows.parquet
          0.5 kB
          Dave Challis
        2. empty.parquet
          0.2 kB
          Arina Ielchiieva

          Issue Links

            Activity

              People

              • Assignee:
                arina Arina Ielchiieva
                Reporter:
                tobad357 Tobias
                Reviewer:
                Vova Vysotskyi
              • Votes:
                1 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: