Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-31 Thread Julian Hyde
gt; That makes sense. Actually we had a discussion[1] on moving to >>>>>>>>> "LOOKAHEAD=1", and seems we are close to finish it. By doing this >>>> we >>>>>> have >>>>>>>>> extra benefits that we don't need to turn forceLaC

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-31 Thread Julian Hyde
>> >>>>>>>> [1] https://issues.apache.org/jira/browse/CALCITE-2847 >>>>>>>> >>>>>>>>> On Mar 27, 2019, at 10:40, Rui Li wrote: >>>>>>>>> >>>>>>>>> Thanks Hongze for l

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-31 Thread Muhammad Gelbana
>> > lookahead >> > > >> of >> > > >>> 3 >> > > >>>> or more. I guess we'd better get rid of these warnings if we >> want to >> > > >>> stick >> > > >>>> to

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-31 Thread Muhammad Gelbana
gt; >>>> > > > >>>> On Wed, Mar 27, 2019 at 8:54 AM Hongze Zhang > > > >> wrote: > > > >>>> > > > >>>>> Thanks, Yuzhao. > > > >>>>> > > > >>>>> Since the more generic proble

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-31 Thread Stamatis Zampetakis
> >>>>> parent production's looking ahead returns too early, I tried to > find > > a > > >>> bad > > >>>>> case of the same reason under current default setting LOOKAHEAD=2 > but > > >> it > > >>>>> see

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-31 Thread Muhammad Gelbana
gt; seems that under this number we didn't have a chance to meet the > issue > >>> yet. > >>>>> > >>>>> So after that I suggest to not to treat this as a Calcite's issue > >>>>> currently. > >>>>> > &

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-31 Thread Hongze Zhang
>> >>>>> Best, >>>>> Hongze >>>>> >>>>> [1] >>>>> >>> >> https://github.com/apache/calcite/blob/11c067f9992d9c8bc29e2326dd8b299ad1e9dbdc/core/src/main/codegen/templates/Parser.jj#L335 >>>&g

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-31 Thread Muhammad Gelbana
1e9dbdc/core/src/main/codegen/templates/Parser.jj#L335 > > >> > > >>> On Mar 26, 2019, at 20:42, Yuzhao Chen wrote: > > >>> > > >>> Maybe we should fire a jira if it is a bug. > > >>> > > >>> Best, > > >

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-27 Thread Rui Li
26, 2019, at 20:42, Yuzhao Chen wrote: > >>> > >>> Maybe we should fire a jira if it is a bug. > >>> > >>> Best, > >>> Danny Chan > >>> 在 2019年3月26日 +0800 PM8:33,Hongze Zhang ,写道: > >>>> Ops, correct a typo: > &

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-27 Thread Hongze Zhang
o Chen wrote: >>> >>> Maybe we should fire a jira if it is a bug. >>> >>> Best, >>> Danny Chan >>> 在 2019年3月26日 +0800 PM8:33,Hongze Zhang ,写道: >>>> Ops, correct a typo: >>>> >>>> "... after uncommenting a lin

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-26 Thread Rui Li
> > Best, > > Danny Chan > > 在 2019年3月26日 +0800 PM8:33,Hongze Zhang ,写道: > >> Ops, correct a typo: > >> > >> "... after uncommenting a line ..." -> "... after commenting a line > >> ...". > >> > >> Best, >

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-26 Thread Hongze Zhang
>> >> Best, >> Hongze >> >> -- Original Message -- >> From: "Hongze Zhang" >> To: dev@calcite.apache.org >> Sent: 2019/3/26 19:28:08 >> Subject: Re: Calcite doesn't work with LOOKAHEAD(3) >> >>> Firstly,

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-26 Thread Yuzhao Chen
l Message -- > From: "Hongze Zhang" > To: dev@calcite.apache.org > Sent: 2019/3/26 19:28:08 > Subject: Re: Calcite doesn't work with LOOKAHEAD(3) > > > Firstly, thank you very much for sharing the case, Rui! > > > > I have run a test with the SQL you pro

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-26 Thread Hongze Zhang
Ops, correct a typo: "... after uncommenting a line ..." -> "... after commenting a line ...". Best, Hongze -- Original Message -- From: "Hongze Zhang" To: dev@calcite.apache.org Sent: 2019/3/26 19:28:08 Subject: Re: Calcite doesn't work with LOOKA

Re: Calcite doesn't work with LOOKAHEAD(3)

2019-03-26 Thread Hongze Zhang
Firstly, thank you very much for sharing the case, Rui! I have run a test with the SQL you provided and also run into the same exception (under a global LOOKAHEAD 3). After debugging the generated parser code, I think the problem is probably in the generated LOOKAHEAD method