Re: Ordering By Projection Alias in RelToSqlConverter

2018-09-11 Thread Krishnakant Agrawal
Okay, will try and come up with a PR then. On Wed, Sep 12, 2018 at 1:43 AM Julian Hyde wrote: > Thanks for logging a case. It’s not high on my priorities to fix this (or > anyone else’s AFAIK) so contributions are welcome. > > > On Sep 11, 2018, at 3:37 AM, Krishnakant Agrawal > wrote: > > > >

Re: Ordering By Projection Alias in RelToSqlConverter

2018-09-11 Thread Julian Hyde
Thanks for logging a case. It’s not high on my priorities to fix this (or anyone else’s AFAIK) so contributions are welcome. > On Sep 11, 2018, at 3:37 AM, Krishnakant Agrawal > wrote: > > Hi Julian, > > Sorry for the late Reply. > > I have created the JIRA >

Re: Ordering By Projection Alias in RelToSqlConverter

2018-09-11 Thread Krishnakant Agrawal
Hi Julian, Sorry for the late Reply. I have created the JIRA for this issue. I think Order by Ordinal if decided as the default behavior for this resolution should also ask the Dialect before taking decisions. Hive 1.2 shows following message

Re: Ordering By Projection Alias in RelToSqlConverter

2018-09-03 Thread Julian Hyde
It sounds like a bug. Can you please log a JIRA case. We should consult the target dialect and generate sql according to the rules for what is allowed in ORDER BY. In calcite, and probably also in hive, “ORDER BY emp.first_name” would be valid. But probably “ORDER BY ” is the best solution on

Ordering By Projection Alias in RelToSqlConverter

2018-09-03 Thread Krishnakant Agrawal
Hi All, I am trying to convert a Simple RelNode to SQL Text with Hive as Dialect using RelToSqlConverter. Problem is if the Order By Key is a Projection which was Aliased, the Output query contains the original column name instead of the Alias, which is not allowed in Hive as valid Order By keys