Re: IndexOutOfBoundException, WITH and JOIN

2022-08-18 Thread Julian Hyde
Sorry, my mistake. The query is valid. I read the quotes around ‘k’ as back-ticks, `k`. In which case `k` would be a an identifier rather than a character literal, and there is no object in scope called `k`. Julian > On Aug 18, 2022, at 6:41 PM, Benchao Li wrote: > > Julian, > > The query

Re: IndexOutOfBoundException, WITH and JOIN

2022-08-18 Thread Benchao Li
Julian, The query is invalid. When validating B there is no K in scope. I'm not sure that I understand this statement, could you kindly elaborate a little more? Julian Hyde 于2022年8月18日周四 23:32写道: > The query is invalid. When validating B there is no K in scope. This > should be throwing a

Re: IndexOutOfBoundException, WITH and JOIN

2022-08-18 Thread Julian Hyde
The query is invalid. When validating B there is no K in scope. This should be throwing a validation error in all Calcite versions. If it happens to run in some Calcite versions that is more luck than design. Can you log a jira case please? Julian > On Aug 18, 2022, at 6:00 AM, Egor Ryashin

Re: IndexOutOfBoundException, WITH and JOIN

2022-08-18 Thread Egor Ryashin
true, the version was rather old, thank you. > On 18 Aug 2022, at 02:12, Benchao Li wrote: > > Egor, > > What's the Calcite version are you using? > I tried your code in 1.30.0 and 1.31.0, they both work fine. > > Egor Ryashin 于2022年8月17日周三 22:40写道: > >> Hi all, >> >> I’m trying to figure