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

Reading individual files created by CTAS with partition causes an exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.1.0
    • 1.1.0
    • Storage - Writer
    • None

    Description

      Create a table using CTAS with partitioning:

      create table `lineitem_part` partition by (l_moddate) as select l.*, l_shipdate - extract(day from l_shipdate) + 1 l_moddate from cp.`tpch/lineitem.parquet` l
      

      Then the following query causes an exception

      select distinct l_moddate from `lineitem_part/0_0_1.parquet` where l_moddate = date '1992-01-01';
      

      Trace in the log file -

      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
      at java.lang.String.charAt(String.java:658) ~[na:1.7.0_65]
      at org.apache.drill.exec.planner.logical.partition.PruneScanRule$PathPartition.<init>(PruneScanRule.java:493) ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      at org.apache.drill.exec.planner.logical.partition.PruneScanRule.doOnMatch(PruneScanRule.java:385) ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      at org.apache.drill.exec.planner.logical.partition.PruneScanRule$4.onMatch(PruneScanRule.java:278) ~[drill-java-exec-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
      at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:228) ~[calcite-core-1.1.0-drill-r9.jar:1.1.0-drill-r9]
      ... 13 common frames omitted

      Attachments

        Issue Links

          Activity

            People

              sphillips Steven Phillips
              parthc Parth Chandra
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: