spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Gaido <marcogaid...@gmail.com>
Subject Re: parser error?
Date Mon, 14 May 2018 13:34:22 GMT
Yes Takeshi, I agree, I think we can easily fix the warning replacing the *
with +, since the two options are not required.
I will test this fix and create a PR when it is ready.

Thanks,
Marco

2018-05-14 15:08 GMT+02:00 Takeshi Yamamuro <linguin.m.s@gmail.com>:

> IIUC, since the `lateral View*` matches an empty string in optional
> blocks, antlr shows such a warning;
>
> fromClause
>     : FROM relation (',' relation)* (pivotClause | lateralView*)?
>     ;
>
> http://www.antlr.org/api/JavaTool/org/antlr/v4/tool/
> ErrorType.html#EPSILON_OPTIONAL
>
>
> On Mon, May 14, 2018 at 9:47 PM, Sean Owen <srowen@gmail.com> wrote:
>
>> I don't know anything about it directly, but seems like it would have
>> been caused by https://github.com/apache/spark/commit/e3201e165e41f076ec
>> 72175af246d12c0da529cf
>> The "?" in fromClause is what's generating the warning, and it may be
>> ignorable.
>>
>> On Mon, May 14, 2018 at 12:38 AM Reynold Xin <rxin@databricks.com> wrote:
>>
>>> Just saw this in one of my PR that's doc only:
>>>
>>> [error] warning(154): SqlBase.g4:400:0: rule fromClause contains an optional
block with at least one alternative that can match an empty string
>>>
>>>
>>>
>>>
>
>
> --
> ---
> Takeshi Yamamuro
>

Mime
View raw message