You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/04/16 19:38:16 UTC

[jira] [Commented] (DRILL-533) Queries fail with NPE if the dfs schema has no default workspace but has non-default workspace

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

ASF GitHub Bot commented on DRILL-533:
--------------------------------------

GitHub user vkorukanti opened a pull request:

    https://github.com/apache/incubator-drill/pull/51

    DRILL-533: Queries fail with NPE if dfs/cp schema has no default workspa...

    ...ce but has non-default workspace
    
    We currently add the "default" workspace only if there are no workspaces defined, but we always choose the workspace with "default" name as the default workspace. As in the repro case there is no default workspace, we end with a null.
    
    Fix: Add default workspace if there is no "default" given in storage-engines.json

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vkorukanti/incubator-drill DRILL-533

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-drill/pull/51.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #51
    
----
commit 9f6ec7783d6b97d65561c23914d06d0df7b6b33d
Author: vkorukanti <ve...@gmail.com>
Date:   2014-04-16T17:32:24Z

    DRILL-533: Queries fail with NPE if dfs/cp schema has no default workspace but has non-default workspace
    
    We currently add the "default" workspace only if there are no workspaces defined, but we always choose the workspace with "default" name as the default workspace. As in the repro case there is no default workspace, we end with a null.
    
    Fix: Add default workspace if there is no "default" given in storage-engines.json

----


> Queries fail with NPE if the dfs schema has no default workspace but has non-default workspace
> ----------------------------------------------------------------------------------------------
>
>                 Key: DRILL-533
>                 URL: https://issues.apache.org/jira/browse/DRILL-533
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Venki Korukanti
>            Assignee: Venki Korukanti
>
> storage-engines.json to repro:
> {code}
> {
>   "storage":{
>     dfs: {
>       type: "file",
>       connection: "file:///",
>       workspaces: {
>         home: "/"
>       }
>     },
>     cp: {
>       type: "file",
>       connection: "classpath:///",
>       workspaces: {
>         home: "/"
>       }
>     }
> }
> {code}
> Query:
> {code}
> select * from dfs.`region.parquet`;
> {code}
> Failure
> {code}
> java.lang.NullPointerException
> at org.apache.drill.exec.store.dfs.FileSystemSchemaFactory$FileSystemSchema.getTableNames(FileSystemSchemaFactory.java:109)
> at net.hydromatic.optiq.jdbc.OptiqSchema.<init>(OptiqSchema.java:68)
> at net.hydromatic.optiq.jdbc.OptiqSchema.add(OptiqSchema.java:185)
> at net.hydromatic.optiq.jdbc.OptiqSchema$SchemaPlusImpl.add(OptiqSchema.java:339)
> at org.apache.drill.exec.store.dfs.FileSystemSchemaFactory.registerSchemas(FileSystemSchemaFactory.java:57)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)