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....@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.**** >