drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Raj <rahul....@option3consulting.com>
Subject Re: Incorrect column name with OVER clause on Drill 1.8
Date Sun, 04 Dec 2016 10:55:08 GMT
I was using sqlline and web console with drill 1.9.

I executed a select all on a very small csv file, but surprisingly found
few additional columns [fqn,filename,filepath,suffix] along with the array
containing the results. Then converted the results to parquet by selecting
the specific required columns. The parquet file was created with the same
additional columns in spite of selecting the required columns.

The column aliases are missing in the queries executed on the resulting
parquet. I am not sure if the problems are related.

My findings and the query plan are attached as  findings.txt.

Regards,
Rahul

On Sun, Dec 4, 2016 at 1:17 PM, Abhishek Girish <abhishek.girish@gmail.com>
wrote:

> I ran a similar query on a parquet dataset - and they returned the right
> results. This was on Drill 1.9.0 on CentOS. Tried via (1) Sqlline, (2)
> Drill web UI and (3) a custom JDBC app. I'm not sure why column aliases
> aren't taking affect for you. What client are you using? And also share the
> text plan for the query.
>
> > select c_last_review_date as `a`, sum(c_birth_month) over() as `b` from
> customer limit 1;
> *+----------+---------+*
> *| **   a    ** | **   b   ** |*
> *+----------+---------+*
> *| *2452508 * | *628122
> * |**+----------+---------+*
>
> On Sat, Dec 3, 2016 at 11:16 PM, Rahul Raj <rahul.raj@option3consulting.
> com>
> wrote:
>
> > Ignore the '${}' in the table name ${purchases_by_item_date}, it gets
> > substituted as a valid name.
> > Rahul
> >
> > On Sun, Dec 4, 2016 at 12:36 PM, Rahul Raj <rahul.raj@option3consulting.
> > com>
> > wrote:
> >
> > > The following query:
> > >
> > > SELECT
> > > bill_date,
> > > sum(sell_amt) over() as `cum_purchases_amt`
> > > FROM ${purchases_by_item_date}
> > >
> > > on a parquet file returns column name as '$1' instead of
> > cum_purchases_amt.
> > > Any ways to override the name?
> > >
> > > Drill 1.6 also shows the same behaviour.
> > >
> > > Rahul
> > >
> > >
> >
> > --
> > **** This email and any files transmitted with it are confidential and
> > intended solely for the use of the individual or entity to whom it is
> > addressed. If you are not the named addressee then you should not
> > disseminate, distribute or copy this e-mail. Please notify the sender
> > immediately and delete this e-mail from your system.****
> >
>

-- 
**** This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom it is 
addressed. If you are not the named addressee then you should not 
disseminate, distribute or copy this e-mail. Please notify the sender 
immediately and delete this e-mail from your system.****

Mime
View raw message