You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by rahul challapalli <ch...@gmail.com> on 2015/10/19 18:55:46 UTC

How is dir0 inferred from the directory path

Drillers,

The below result suggests that 'dir0' is inferred treating
'/drill/testdata/audits' as the root in the below query. Is this by design
that the first '*' gets treated as dir0?

select * from dfs.`/drill/testdata/audits/*/audit/*.json` limit 1;
+--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
|  dir0     |  dir1  |        timestamp                | operation  | uid
 |   ipAddress   | columnFamily  | columnQualifier  |    tableFid    |
+----------+--------+--------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
| node1  | audit  | 2015-06-06 10:41:19.248  | op1          | 0    |
10.10.105.51  | CF1                | clq1                  | 123
  |
+--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+

- Rahul

Re: How is dir0 inferred from the directory path

Posted by rahul challapalli <ch...@gmail.com>.
Thanks for your replies. For my usecase treating the first variable
directory as dir0 made sense. I just wanted to confirm that this was not an
unintended side-effect

- Rahul

On Tue, Oct 20, 2015 at 10:34 AM, Jason Altekruse <al...@gmail.com>
wrote:

> I can understand an argument for consistency starting at the root requested
> directory. However, I don't think it isn't crazy to start at the first
> variable directory, because anything before that is providing information
> back to users that they put into the query explicitly themselves.
>
> On Mon, Oct 19, 2015 at 10:42 PM, Jacques Nadeau <ja...@dremio.com>
> wrote:
>
> > The first variable directory gets treated as a dirX starting point I
> > believe.
> >
> > Doesn't seem like a bug to me.
> > On Oct 19, 2015 9:56 AM, "rahul challapalli" <challapallirahul@gmail.com
> >
> > wrote:
> >
> > > Drillers,
> > >
> > > The below result suggests that 'dir0' is inferred treating
> > > '/drill/testdata/audits' as the root in the below query. Is this by
> > design
> > > that the first '*' gets treated as dir0?
> > >
> > > select * from dfs.`/drill/testdata/audits/*/audit/*.json` limit 1;
> > >
> > >
> >
> +--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> > > |  dir0     |  dir1  |        timestamp                | operation  |
> uid
> > >  |   ipAddress   | columnFamily  | columnQualifier  |    tableFid    |
> > >
> > >
> >
> +----------+--------+--------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> > > | node1  | audit  | 2015-06-06 10:41:19.248  | op1          | 0    |
> > > 10.10.105.51  | CF1                | clq1                  | 123
> > >   |
> > >
> > >
> >
> +--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> > >
> > > - Rahul
> > >
> >
>

Re: How is dir0 inferred from the directory path

Posted by Jason Altekruse <al...@gmail.com>.
I can understand an argument for consistency starting at the root requested
directory. However, I don't think it isn't crazy to start at the first
variable directory, because anything before that is providing information
back to users that they put into the query explicitly themselves.

On Mon, Oct 19, 2015 at 10:42 PM, Jacques Nadeau <ja...@dremio.com> wrote:

> The first variable directory gets treated as a dirX starting point I
> believe.
>
> Doesn't seem like a bug to me.
> On Oct 19, 2015 9:56 AM, "rahul challapalli" <ch...@gmail.com>
> wrote:
>
> > Drillers,
> >
> > The below result suggests that 'dir0' is inferred treating
> > '/drill/testdata/audits' as the root in the below query. Is this by
> design
> > that the first '*' gets treated as dir0?
> >
> > select * from dfs.`/drill/testdata/audits/*/audit/*.json` limit 1;
> >
> >
> +--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> > |  dir0     |  dir1  |        timestamp                | operation  | uid
> >  |   ipAddress   | columnFamily  | columnQualifier  |    tableFid    |
> >
> >
> +----------+--------+--------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> > | node1  | audit  | 2015-06-06 10:41:19.248  | op1          | 0    |
> > 10.10.105.51  | CF1                | clq1                  | 123
> >   |
> >
> >
> +--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> >
> > - Rahul
> >
>

Re: How is dir0 inferred from the directory path

Posted by Jacques Nadeau <ja...@dremio.com>.
The first variable directory gets treated as a dirX starting point I
believe.

Doesn't seem like a bug to me.
On Oct 19, 2015 9:56 AM, "rahul challapalli" <ch...@gmail.com>
wrote:

> Drillers,
>
> The below result suggests that 'dir0' is inferred treating
> '/drill/testdata/audits' as the root in the below query. Is this by design
> that the first '*' gets treated as dir0?
>
> select * from dfs.`/drill/testdata/audits/*/audit/*.json` limit 1;
>
> +--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> |  dir0     |  dir1  |        timestamp                | operation  | uid
>  |   ipAddress   | columnFamily  | columnQualifier  |    tableFid    |
>
> +----------+--------+--------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> | node1  | audit  | 2015-06-06 10:41:19.248  | op1          | 0    |
> 10.10.105.51  | CF1                | clq1                  | 123
>   |
>
> +--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
>
> - Rahul
>

Re: How is dir0 inferred from the directory path

Posted by Ted Dunning <te...@gmail.com>.
I think that looks like a bug.



On Mon, Oct 19, 2015 at 9:55 AM, rahul challapalli <
challapallirahul@gmail.com> wrote:

> Drillers,
>
> The below result suggests that 'dir0' is inferred treating
> '/drill/testdata/audits' as the root in the below query. Is this by design
> that the first '*' gets treated as dir0?
>
> select * from dfs.`/drill/testdata/audits/*/audit/*.json` limit 1;
>
> +--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> |  dir0     |  dir1  |        timestamp                | operation  | uid
>  |   ipAddress   | columnFamily  | columnQualifier  |    tableFid    |
>
> +----------+--------+--------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
> | node1  | audit  | 2015-06-06 10:41:19.248  | op1          | 0    |
> 10.10.105.51  | CF1                | clq1                  | 123
>   |
>
> +--------+--------+----------------------------------------+---------------+------+--------------------+----------------------+------------------------+-----------------+
>
> - Rahul
>