drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jinfeng Ni <...@apache.org>
Subject Re: Should we make dir* columns only exist when requested?
Date Thu, 23 Apr 2015 22:56:18 GMT
I think the new proposal makes sense. It makes the behavior of select *
consistent, only returning the regular columns in the table, regardless how
the table/file is specified in the query.

On Thu, Apr 23, 2015 at 2:56 PM, Jacques Nadeau <jacques@apache.org> wrote:

> I'm specifically arguing that SELECT * doesn't return the columns.
>
> Here is current behavior:
>
> /mytdir/mysdir/myfile.json
> {a:1,b:2,c:3}
> {a:4,b:5,c:6}
>
> select * from `myfile.json`
>
> a, b, c
> 1, 2, 3
> 4, 5, 6
>
> select * from `/mysdir/myfile.json`
>
> dir0 a, b, c
> mysdir, 1, 2, 3
> mysdir, 4, 5, 6
>
> select * from `/mytdir/mysdir/myfile.json`
>
> dir0, dir1 a, b, c
> mytdir, mysdir, 1, 2, 3
> mytdir, mysdir, 4, 5, 6
>
>
> ====================================
> My proposal:
>
> select * from `myfile.json`
> select * from `/mysdir/myfile.json`
> select * from `/mytdir/mysdir/myfile.json`
> ::all produce::
> a, b, c
> 1, 2, 3
> 4, 5, 6
>
> select dir0, a, b, c from `/mysdir/myfile.json`
>
> dir0 a, b, c
> mysdir, 1, 2, 3
> mysdir, 4, 5, 6
>
> select dir0, a, b, c from `/mytdir/mysdir/myfile.json`
>
> dir0 a, b, c
> mytdir, 1, 2, 3
> mytdir, 4, 5, 6
>
>
>
>
> On Thu, Apr 23, 2015 at 5:42 PM, Aman Sinha <asinha@maprtech.com> wrote:
>
> > Seems reasonable, as long as SELECT * also returns the dir# columns.
> >
> > On Thu, Apr 23, 2015 at 2:34 PM, Jacques Nadeau <jacques@apache.org>
> > wrote:
> >
> > > Hey guys,
> > >
> > > I've been thinking that always showing dir# columns seems to alter data
> > > returned from Drill depending on how you select the directory.  I'd
> > propose
> > > that we make it so that we only return dir# columns when they are
> > > explicitly requested.
> > >
> > > Thoughts?
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message