Re: parser error?

2018-05-14 Thread 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 :

> 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  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  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
>


Re: parser error?

2018-05-14 Thread 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*)?
;

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  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  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


Re: parser error?

2018-05-14 Thread Sean Owen
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  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
>
>
>
>


InMemoryTableScanExec.inputRDD and buffers (RDD[CachedBatch])

2018-05-14 Thread Jacek Laskowski
Hi,

Is there any reason why InMemoryTableScanExec.inputRDD does not use the
buffers local value [1] for the non-batch case [2]? Just curious as I ran
into it and thought I'd do a tiny refactoring.

[1]
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryTableScanExec.scala?utf8=%E2%9C%93#L105
[2]
https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryTableScanExec.scala?utf8=%E2%9C%93#L125

Pozdrawiam,
Jacek Laskowski

https://about.me/JacekLaskowski
Mastering Spark SQL https://bit.ly/mastering-spark-sql
Spark Structured Streaming https://bit.ly/spark-structured-streaming
Mastering Kafka Streams https://bit.ly/mastering-kafka-streams
Follow me at https://twitter.com/jaceklaskowski