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

Misleading error message when querying an empty Parquet file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.7.0
    • 1.17.0
    • Execution - Flow
    • None

    Description

      It is possible that a CTAS may fail and create an empty Parquet file. When we run a query against this file, we get a misleading error message from the planner that hides the original IOException, although the log file does have the original exception:

      0: jdbc:drill:zk=local> select count(*) from dfs.`/tmp/empty.parquet`;
      Query failed: Query failed: Unexpected exception during fragment initialization: Internal error: Error while applying rule DrillPushProjIntoScan, args [rel#77:ProjectRel.NONE.ANY([]).[](child=rel#76:Subset#0.ENUMERABLE.ANY([]).[],$f0=0), rel#68:EnumerableTableAccessRel.ENUMERABLE.ANY([]).[](table=[dfs, /tmp/empty.parquet])]
      

      The cause of the exception is in the logs:
      Caused by: java.io.IOException: Could not read footer: java.lang.RuntimeException: file:/tmp/empty.parquet is not a Parquet file (too small)
      at parquet.hadoop.ParquetFileReader.readAllFootersInParallel(ParquetFileReader.java:195) ~[parquet-hadoop-1.5.1-drill-r4.jar:0.7.0-SNAPSHOT]
      at parquet.hadoop.ParquetFileReader.readAllFootersInParallel(ParquetFileReader.java:208) ~[parquet-hadoop-1.5.1-drill-r4.jar:0.7.0-SNAPSHOT]
      at parquet.hadoop.ParquetFileReader.readFooters(ParquetFileReader.java:224) ~[parquet-hadoop-1.5.1-drill-r4.jar:0.7.0-SNAPSHOT]
      at org.apache.drill.exec.store.parquet.ParquetGroupScan.readFooter(ParquetGroupScan.java:208) ~[drill-java-exec-0.7.0-SNAPSHOT-rebuffed.jar:0.7.0-SNAPSHOT]

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              amansinha100 Aman Sinha
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: