You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Siva B <si...@outlook.com> on 2015/07/17 14:23:55 UTC
Double quotes in alias name not working
Hi,
Why drill not accepting Column alias name with quotes is not working. It works only with ` symbol.
Working Query: SELECT id, name AS `user` from users;
Actual Query: SELECT id, name AS "user" from users; [How to make it this works.]
Please share workaround for this scenario.
Thanks
Re: Double quotes in alias name not working
Posted by Jinfeng Ni <ji...@gmail.com>.
Filed DRILL-3510 for this.
On Fri, Jul 17, 2015 at 10:27 AM, Parth Chandra <pa...@apache.org> wrote:
> +1.
>
>
> On Fri, Jul 17, 2015 at 9:31 AM, Jacques Nadeau <ja...@apache.org>
> wrote:
>
> > Jinfeng, that is a great idea. Do you want to open an enhancement
> request
> > and we'll see how many votes that feature gets?
> >
> > On Fri, Jul 17, 2015 at 7:46 AM, Jinfeng Ni <ji...@gmail.com>
> wrote:
> >
> > > backtick (“`”) is used in MySQL as identifier quotes[1]. Drill uses the
> > > same way as MySQL.
> > >
> > > I think you made a good point. Probably Drill should add an ANSI_QUOTES
> > > option,
> > > just like what MySql does. That way, user does not have to change the
> > > quotes in their existing query.
> > >
> > > 1. http://dev.mysql.com/doc/refman/5.7/en/identifiers.html
> > >
> > > On Fri, Jul 17, 2015 at 6:31 AM, Siva B <si...@outlook.com> wrote:
> > >
> > > > I hope drill should supports ANSI SQL. Any particular reason for not
> > > > supporting quotes.
> > > > I am trying to connect drill with my legacy application. It has huge
> > set
> > > > of queries. I can't change every quotes with bachtick.
> > > > Thanks.
> > > >
> > > > > Date: Fri, 17 Jul 2015 05:41:06 -0700
> > > > > Subject: Re: Double quotes in alias name not working
> > > > > From: adeneche@maprtech.com
> > > > > To: user@drill.apache.org
> > > > >
> > > > > you only need to use backtick ` symbol when you want to use a
> > "reserved
> > > > > word" (`user` in this case). I don't think Drill supports double
> > > quotes.
> > > > >
> > > > > Is there a specific reason you want to use double quotes instead of
> > > > > backticks ?
> > > > >
> > > > > On Fri, Jul 17, 2015 at 5:23 AM, Siva B <si...@outlook.com>
> wrote:
> > > > >
> > > > > > Hi,
> > > > > > Why drill not accepting Column alias name with quotes is not
> > working.
> > > > It
> > > > > > works only with ` symbol.
> > > > > > Working Query: SELECT id, name AS `user` from users;
> > > > > > Actual Query: SELECT id, name AS "user" from users; [How to make
> it
> > > > this
> > > > > > works.]
> > > > > > Please share workaround for this scenario.
> > > > > > 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
> > > > >
> > > >
> > > >
> > >
> >
>
Re: Double quotes in alias name not working
Posted by Parth Chandra <pa...@apache.org>.
+1.
On Fri, Jul 17, 2015 at 9:31 AM, Jacques Nadeau <ja...@apache.org> wrote:
> Jinfeng, that is a great idea. Do you want to open an enhancement request
> and we'll see how many votes that feature gets?
>
> On Fri, Jul 17, 2015 at 7:46 AM, Jinfeng Ni <ji...@gmail.com> wrote:
>
> > backtick (“`”) is used in MySQL as identifier quotes[1]. Drill uses the
> > same way as MySQL.
> >
> > I think you made a good point. Probably Drill should add an ANSI_QUOTES
> > option,
> > just like what MySql does. That way, user does not have to change the
> > quotes in their existing query.
> >
> > 1. http://dev.mysql.com/doc/refman/5.7/en/identifiers.html
> >
> > On Fri, Jul 17, 2015 at 6:31 AM, Siva B <si...@outlook.com> wrote:
> >
> > > I hope drill should supports ANSI SQL. Any particular reason for not
> > > supporting quotes.
> > > I am trying to connect drill with my legacy application. It has huge
> set
> > > of queries. I can't change every quotes with bachtick.
> > > Thanks.
> > >
> > > > Date: Fri, 17 Jul 2015 05:41:06 -0700
> > > > Subject: Re: Double quotes in alias name not working
> > > > From: adeneche@maprtech.com
> > > > To: user@drill.apache.org
> > > >
> > > > you only need to use backtick ` symbol when you want to use a
> "reserved
> > > > word" (`user` in this case). I don't think Drill supports double
> > quotes.
> > > >
> > > > Is there a specific reason you want to use double quotes instead of
> > > > backticks ?
> > > >
> > > > On Fri, Jul 17, 2015 at 5:23 AM, Siva B <si...@outlook.com> wrote:
> > > >
> > > > > Hi,
> > > > > Why drill not accepting Column alias name with quotes is not
> working.
> > > It
> > > > > works only with ` symbol.
> > > > > Working Query: SELECT id, name AS `user` from users;
> > > > > Actual Query: SELECT id, name AS "user" from users; [How to make it
> > > this
> > > > > works.]
> > > > > Please share workaround for this scenario.
> > > > > 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
> > > >
> > >
> > >
> >
>
Re: Double quotes in alias name not working
Posted by Jacques Nadeau <ja...@apache.org>.
Jinfeng, that is a great idea. Do you want to open an enhancement request
and we'll see how many votes that feature gets?
On Fri, Jul 17, 2015 at 7:46 AM, Jinfeng Ni <ji...@gmail.com> wrote:
> backtick (“`”) is used in MySQL as identifier quotes[1]. Drill uses the
> same way as MySQL.
>
> I think you made a good point. Probably Drill should add an ANSI_QUOTES
> option,
> just like what MySql does. That way, user does not have to change the
> quotes in their existing query.
>
> 1. http://dev.mysql.com/doc/refman/5.7/en/identifiers.html
>
> On Fri, Jul 17, 2015 at 6:31 AM, Siva B <si...@outlook.com> wrote:
>
> > I hope drill should supports ANSI SQL. Any particular reason for not
> > supporting quotes.
> > I am trying to connect drill with my legacy application. It has huge set
> > of queries. I can't change every quotes with bachtick.
> > Thanks.
> >
> > > Date: Fri, 17 Jul 2015 05:41:06 -0700
> > > Subject: Re: Double quotes in alias name not working
> > > From: adeneche@maprtech.com
> > > To: user@drill.apache.org
> > >
> > > you only need to use backtick ` symbol when you want to use a "reserved
> > > word" (`user` in this case). I don't think Drill supports double
> quotes.
> > >
> > > Is there a specific reason you want to use double quotes instead of
> > > backticks ?
> > >
> > > On Fri, Jul 17, 2015 at 5:23 AM, Siva B <si...@outlook.com> wrote:
> > >
> > > > Hi,
> > > > Why drill not accepting Column alias name with quotes is not working.
> > It
> > > > works only with ` symbol.
> > > > Working Query: SELECT id, name AS `user` from users;
> > > > Actual Query: SELECT id, name AS "user" from users; [How to make it
> > this
> > > > works.]
> > > > Please share workaround for this scenario.
> > > > 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
> > >
> >
> >
>
Re: Double quotes in alias name not working
Posted by Jinfeng Ni <ji...@gmail.com>.
backtick (“`”) is used in MySQL as identifier quotes[1]. Drill uses the
same way as MySQL.
I think you made a good point. Probably Drill should add an ANSI_QUOTES option,
just like what MySql does. That way, user does not have to change the
quotes in their existing query.
1. http://dev.mysql.com/doc/refman/5.7/en/identifiers.html
On Fri, Jul 17, 2015 at 6:31 AM, Siva B <si...@outlook.com> wrote:
> I hope drill should supports ANSI SQL. Any particular reason for not
> supporting quotes.
> I am trying to connect drill with my legacy application. It has huge set
> of queries. I can't change every quotes with bachtick.
> Thanks.
>
> > Date: Fri, 17 Jul 2015 05:41:06 -0700
> > Subject: Re: Double quotes in alias name not working
> > From: adeneche@maprtech.com
> > To: user@drill.apache.org
> >
> > you only need to use backtick ` symbol when you want to use a "reserved
> > word" (`user` in this case). I don't think Drill supports double quotes.
> >
> > Is there a specific reason you want to use double quotes instead of
> > backticks ?
> >
> > On Fri, Jul 17, 2015 at 5:23 AM, Siva B <si...@outlook.com> wrote:
> >
> > > Hi,
> > > Why drill not accepting Column alias name with quotes is not working.
> It
> > > works only with ` symbol.
> > > Working Query: SELECT id, name AS `user` from users;
> > > Actual Query: SELECT id, name AS "user" from users; [How to make it
> this
> > > works.]
> > > Please share workaround for this scenario.
> > > 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
> >
>
>
RE: Double quotes in alias name not working
Posted by Siva B <si...@outlook.com>.
I hope drill should supports ANSI SQL. Any particular reason for not supporting quotes.
I am trying to connect drill with my legacy application. It has huge set of queries. I can't change every quotes with bachtick.
Thanks.
> Date: Fri, 17 Jul 2015 05:41:06 -0700
> Subject: Re: Double quotes in alias name not working
> From: adeneche@maprtech.com
> To: user@drill.apache.org
>
> you only need to use backtick ` symbol when you want to use a "reserved
> word" (`user` in this case). I don't think Drill supports double quotes.
>
> Is there a specific reason you want to use double quotes instead of
> backticks ?
>
> On Fri, Jul 17, 2015 at 5:23 AM, Siva B <si...@outlook.com> wrote:
>
> > Hi,
> > Why drill not accepting Column alias name with quotes is not working. It
> > works only with ` symbol.
> > Working Query: SELECT id, name AS `user` from users;
> > Actual Query: SELECT id, name AS "user" from users; [How to make it this
> > works.]
> > Please share workaround for this scenario.
> > 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>
Re: Double quotes in alias name not working
Posted by Abdel Hakim Deneche <ad...@maprtech.com>.
you only need to use backtick ` symbol when you want to use a "reserved
word" (`user` in this case). I don't think Drill supports double quotes.
Is there a specific reason you want to use double quotes instead of
backticks ?
On Fri, Jul 17, 2015 at 5:23 AM, Siva B <si...@outlook.com> wrote:
> Hi,
> Why drill not accepting Column alias name with quotes is not working. It
> works only with ` symbol.
> Working Query: SELECT id, name AS `user` from users;
> Actual Query: SELECT id, name AS "user" from users; [How to make it this
> works.]
> Please share workaround for this scenario.
> 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>