parser error?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

parser error?

rxin
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


Reply | Threaded
Open this post in threaded view
|

Re: parser error?

Sean Owen-2
I don't know anything about it directly, but seems like it would have been caused by https://github.com/apache/spark/commit/e3201e165e41f076ec72175af246d12c0da529cf
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 <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: parser error?

Takeshi Yamamuro
IIUC, since the `lateral View*` matches an empty string in optional blocks, antlr shows such a warning;

fromClause
    : FROM relation (',' relation)* (pivotClause | lateralView*)?
    ;



On Mon, May 14, 2018 at 9:47 PM, Sean Owen <[hidden email]> wrote:
I don't know anything about it directly, but seems like it would have been caused by https://github.com/apache/spark/commit/e3201e165e41f076ec72175af246d12c0da529cf
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: parser error?

Marco Gaido
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 <[hidden email]>:
IIUC, since the `lateral View*` matches an empty string in optional blocks, antlr shows such a warning;

fromClause
    : FROM relation (',' relation)* (pivotClause | lateralView*)?
    ;



On Mon, May 14, 2018 at 9:47 PM, Sean Owen <[hidden email]> wrote:
I don't know anything about it directly, but seems like it would have been caused by https://github.com/apache/spark/commit/e3201e165e41f076ec72175af246d12c0da529cf
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 <[hidden email]> 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