drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2618) BasicFormatMatcher calls getFirstPath(...) without checking # of paths is not zero
Date Thu, 01 Oct 2015 21:19:26 GMT

    [ https://issues.apache.org/jira/browse/DRILL-2618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14940430#comment-14940430
] 

Victoria Markman commented on DRILL-2618:
-----------------------------------------

'empty' is an empty directory:
{code}
0: jdbc:drill:schema=dfs> select * from empty;
Error: VALIDATION ERROR: Index: 0, Size: 0
[Error Id: ee7734e8-3c84-4cbd-882a-86108a39dbd7 on atsqa4-133.qa.lab:31010] (state=,code=0)

2015-10-01 21:16:46,744 [29f25d41-0e1a-98b2-375c-074f129376ac:foreman] INFO  o.a.d.e.planner.sql.DrillSqlWorker
- User Error Occurred
org.apache.drill.common.exceptions.UserException: VALIDATION ERROR: Index: 0, Size: 0


[Error Id: ee7734e8-3c84-4cbd-882a-86108a39dbd7 ]
        at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:534)
~[drill-common-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:181)
[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:905) [drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:244) [drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_71]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_71]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
Caused by: org.apache.calcite.tools.ValidationException: java.lang.IndexOutOfBoundsException:
Index: 0, Size: 0
        at org.apache.calcite.prepare.PlannerImpl.validate(PlannerImpl.java:179) ~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.prepare.PlannerImpl.validateAndGetType(PlannerImpl.java:188)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode(DefaultSqlHandler.java:447)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert(DefaultSqlHandler.java:190)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:159)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:178)
[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        ... 5 common frames omitted
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:635) ~[na:1.7.0_71]
        at java.util.ArrayList.get(ArrayList.java:411) ~[na:1.7.0_71]
        at org.apache.drill.exec.store.dfs.FileSelection.getFirstPath(FileSelection.java:100)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.store.dfs.BasicFormatMatcher.isReadable(BasicFormatMatcher.java:75)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.create(WorkspaceSchemaFactory.java:338)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.create(WorkspaceSchemaFactory.java:153)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.ExpandingConcurrentMap.getNewEntry(ExpandingConcurrentMap.java:96)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.ExpandingConcurrentMap.get(ExpandingConcurrentMap.java:90)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.getTable(WorkspaceSchemaFactory.java:276)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.calcite.jdbc.SimpleCalciteSchema.getTable(SimpleCalciteSchema.java:83)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.prepare.CalciteCatalogReader.getTableFrom(CalciteCatalogReader.java:116)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.prepare.CalciteCatalogReader.getTable(CalciteCatalogReader.java:99)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.prepare.CalciteCatalogReader.getTable(CalciteCatalogReader.java:70)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.EmptyScope.getTableNamespace(EmptyScope.java:75)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.DelegatingScope.getTableNamespace(DelegatingScope.java:124)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:104)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:86)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:877)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:863)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2777)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2762)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:2985)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:86)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:877)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:863)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:210) ~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:837)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:551)
~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        at org.apache.calcite.prepare.PlannerImpl.validate(PlannerImpl.java:177) ~[calcite-core-1.4.0-drill-r5.jar:1.4.0-drill-r5]
        ... 10 common frames omitted
{code}

> BasicFormatMatcher calls getFirstPath(...) without checking # of paths is not zero
> ----------------------------------------------------------------------------------
>
>                 Key: DRILL-2618
>                 URL: https://issues.apache.org/jira/browse/DRILL-2618
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Other
>            Reporter: Daniel Barclay (Drill)
>             Fix For: Future
>
>
> {{BasicFormatMatcher.isReadable(...)}} calls {{getFirstPath(...)}} without checking that
there is at least one path.  This can cause an IndexOutOfBoundsException.
> To reproduce, create an empty directory {{/tmp/CaseInsensitiveColumnNames}} and run {{exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message