Got it, Thank you! On Mon, Aug 22, 2022 at 1:45 PM Julian Hyde <[email protected]> wrote:
> Yes, there are more semantics to be defined. Think of the tricky edge > cases, try them on Teradata and any other databases with these semantics, > design error messages, and write tests. > > > On Aug 22, 2022, at 1:37 PM, Jay Narale <[email protected]> wrote: > > > > Can we use the semantics defined by Teradata [1]? Are there any more > > semantics to be defined? > > > > > > [1] - > > > https://docs.teradata.com/r/e79ET77~NzPDz~Ykinj44w/MKSYuTyx2UJWXzdHJf3~sQ > > > > On Sat, Aug 20, 2022 at 11:53 AM Julian Hyde <[email protected]> > wrote: > > > >> Agreed. Aliases-in-where (enabled by a compliance flag) is a valid > feature > >> request but you’d have to fully define the semantics. > >> > >> Julian > >> > >>> On Aug 19, 2022, at 22:46, Jiajun Xie <[email protected]> > wrote: > >>> > >>> Hi, Broeder: > >>> There's a tricky situation: alias may be the same as column name. Some > >>> users often make mistakes in company that I worked, so I have to point > >> out > >>> their problems. > >>> > >>> If you want to support alias in the WHERE clause, I hope you can > consider > >>> how to handle this situation. > >>> > >>>> On Sat, 20 Aug 2022 at 07:31, Sean Broeder <[email protected]> wrote: > >>>> > >>>> > >>>> > >>>>>> On Aug 19, 2022, at 3:57 PM, Sean Broeder <[email protected]> wrote: > >>>>> > >>>>> Thanks for the clarification > >>>>> > >>>>>> On Aug 19, 2022, at 3:23 PM, Julian Hyde <[email protected] > >>>> <mailto:[email protected]>> wrote: > >>>>>> > >>>>>> Column aliases are only available in the ORDER BY clause. In some > >>>> dialect-compliance settings, they are also available in the GROUP BY > and > >>>> HAVING clauses. But not in the WHERE clause. > >>>>> > >>>> Hi Julian, > >>>> It looks like some databases do support column aliasing in where > >> clauses, > >>>> for example, Terradata documentation indicates it does. > >>>> > >>>> > >> > https://docs.teradata.com/r/Teradata-Database-SQL-Fundamentals/June-2017/Basic-SQL-Syntax/Referencing-Object-Names-in-a-Request/Using-a-Column-Alias > >>>> > >>>> I am interested in this feature and would contribute an enhancement to > >>>> Calcite if it’s possible. > >>>> > >>>> Do you happen to know if the current lack of support is due to > technical > >>>> difficulties/limitations or it simply hasn’t been implemented yet? > >>>> > >>>> Also, if the latter, do you have a pointer to where I might start > >> looking? > >>>> > >>>> Thanks, > >>>> Sen > >> > > > > > > -- > > Warm Regards, > > > > Jay Narale > > -- Warm Regards, Jay Narale
