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

Fix validation error when querying absent sub folder in embedded mode

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.17.0
    • Fix Version/s: 1.18.0
    • Component/s: None
    • Labels:

      Description

      apache drill> select * from dfs.tmp.`abc.parquet`;
      Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 17: Object 'abc.parquet' not found within 'dfs.tmp'
      
      
      [Error Id: 0dad391e-ea4d-4d13-95e7-218dec865ad2 ] (state=,code=0)
      apache drill> select * from dfs.tmp.`abc/abc`;
      Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 17: Object 'abc/abc' not found within 'dfs.tmp'
      
      
      [Error Id: 94ea83c7-4983-4958-8a82-eea49b58d4ed ] (state=,code=0)
      apache drill> use dfs.tmp;
      +------+-------------------------------------+
      |  ok  |               summary               |
      +------+-------------------------------------+
      | true | Default schema changed to [dfs.tmp] |
      +------+-------------------------------------+
      1 row selected (0.277 seconds)
      apache drill (dfs.tmp)> select * from `abc.parquet`;
      Error: VALIDATION ERROR: From line 1, column 15 to line 1, column 27: Object 'abc.parquet' not found
      
      
      [Error Id: d814df53-2a94-46da-81e5-f49a3d50a665 ] (state=,code=0)
      apache drill (dfs.tmp)> select * from `abc/abc`;
      Error: VALIDATION ERROR: null
      
      
      [Error Id: 6c11d397-f893-4ef6-9832-4a96a2029f7d ] (state=,code=0)
      

      Full error:

      Caused by: java.lang.IllegalArgumentException: 
      	at org.apache.drill.shaded.guava.com.google.common.base.Preconditions.checkArgument(Preconditions.java:121)
      	at org.apache.drill.exec.store.sys.store.LocalPersistentStore.makePath(LocalPersistentStore.java:147)
      	at org.apache.drill.exec.store.sys.store.LocalPersistentStore.get(LocalPersistentStore.java:166)
      	at org.apache.drill.exec.store.sys.CaseInsensitivePersistentStore.get(CaseInsensitivePersistentStore.java:42)
      	at org.apache.drill.exec.store.StoragePluginRegistryImpl.getPlugin(StoragePluginRegistryImpl.java:167)
      	at org.apache.calcite.jdbc.DynamicRootSchema.loadSchemaFactory(DynamicRootSchema.java:80)
      	at org.apache.calcite.jdbc.DynamicRootSchema.getImplicitSubSchema(DynamicRootSchema.java:67)
      	at org.apache.calcite.jdbc.CalciteSchema.getSubSchema(CalciteSchema.java:265)
      	at org.apache.calcite.sql.validate.EmptyScope.resolve_(EmptyScope.java:133)
      	at org.apache.calcite.sql.validate.EmptyScope.resolveTable(EmptyScope.java:99)
      	at org.apache.calcite.sql.validate.DelegatingScope.resolveTable(DelegatingScope.java:203)
      	at org.apache.calcite.sql.validate.IdentifierNamespace.resolveImpl(IdentifierNamespace.java:105)
      	at org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:177)
      	at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:1009)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:969)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3129)
      	at org.apache.drill.exec.planner.sql.conversion.DrillValidator.validateFrom(DrillValidator.java:63)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3111)
      	at org.apache.drill.exec.planner.sql.conversion.DrillValidator.validateFrom(DrillValidator.java:63)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3383)
      	at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60)
      	at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:1009)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:969)
      	at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:216)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:944)
      	at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:651)
      	at org.apache.drill.exec.planner.sql.conversion.SqlConverter.validate(SqlConverter.java:189)
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode(DefaultSqlHandler.java:648)
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateAndConvert(DefaultSqlHandler.java:196)
      	at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:170)
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan(DrillSqlWorker.java:283)
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPhysicalPlan(DrillSqlWorker.java:163)
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.convertPlan(DrillSqlWorker.java:128)
      	at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:93)
      	at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:590)
      	at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:275)
      

      Problem is in LocalPersistentStore which fails when looking for storage plugin with name not acceptable by fs system naming. Store should fail but return that storage plugin which such name is absent (i.e. return null).

        Attachments

          Activity

            People

            • Assignee:
              arina Arina Ielchiieva
              Reporter:
              arina Arina Ielchiieva
              Reviewer:
              Vova Vysotskyi

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment