drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Nadeau <jacq...@apache.org>
Subject Re: should order by on non existing field fail ?
Date Thu, 30 Apr 2015 16:02:03 GMT
That is currently how Drill operates.  This is a general behavior: we don't
know whether the last row will have the field so we can't fail until the
query has read all data.  That being said, since sort is blocking
operation, it would be nice to fail out early.

On Thu, Apr 30, 2015 at 8:58 AM, Abdel Hakim Deneche <adeneche@maprtech.com>
wrote:

> When running the following query, where the field "dummy" doesn't exist:
>
> select o_orderkey, o_custkey from `tpch0.01/orders` order by dummy limit 5;
> I get the following result:
>
> > +------------+------------+
> > | o_orderkey | o_custkey  |
> > +------------+------------+
> > | 2          | 781        |
> > | 3          | 1234       |
> > | 4          | 1369       |
> > | 5          | 445        |
> > | 1          | 370        |
> > +------------+------------+
>
> Is this a bug ? shouldn't the query fail instead ?
>
> If the user makes a mistake and writes a wrong field name, the query will
> still run and the user may not notice the results are actually not sorted
> properly.
>
> Thanks!
>
>
> --
>
> Abdelhakim Deneche
>
> Software Engineer
>
>   <http://www.mapr.com/>
>
>
> Now Available - Free Hadoop On-Demand Training
> <
> http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available
> >
>

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