This is a bug.

On Thu, Jun 23, 2016 at 1:32 PM, rahul challapalli <
challapallira...@gmail.com> wrote:

> This looks like a bug. If you renamed the dir0 column as p_day, then you
> should see that in sqlline as well. And I have never seen
> "_DEFAULT_COL_TO_READ_"
> before. Can you file a jira?
>
> - Rahul
>
> On Thu, Jun 23, 2016 at 12:33 PM, John Omernik <j...@omernik.com> wrote:
>
> > I have a table that is a directory of parquet files, each row had say 3
> > columns, and the table is split into subdirectories that allow me to use
> > dir0 partitioning.
> >
> > so if I select * from `table`
> >
> > I get col1, col2, col3, and dir0 as my fields returned.
> >
> > So if I create a view
> >
> > CREATE VIEW view_myview as
> > select dir0 as `p_day`, col1, col2, col3 from `path/to/table`
> >
> > and run
> > select * from view_myview
> >
> > why, in sqlline, isn't the first column named "p_day"
> >
> > I can reference things in my query by p_day, however, the returned
> results,
> > still say dir0?
> >
> > I dir0 | col1| col2 | col3 |
> >
> > If I do select p_day, col1 then I get
> >
> > | dir0 | col1|
> >
> > if I do select p_day then I get
> >
> > | _DEFAULT_COL_TO_READ_ | dir0 |
> >
> > where the first column (DEFAULT_COL_TO_READ) is always null.
> >
> > If I do select dir0 from view I get "dir0" not found.
> >
> > I guess, the "expected" (principal of least surprise) would be to have it
> > just be a column, that is always labeled p_day, and if I only select
> that,
> > I get the dir0 value repeated for each value.
> >
> > Am I over thinking minutia again? :)
> >
>

Reply via email to