You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by ey-chih chow <ey...@hotmail.com> on 2016/01/28 03:18:47 UTC

corresponding sql for query against LocalRelation

Hi,

For a query against the LocalRelation, is there anybody know what does the
corresponding SQL looks like?  Thanks.

Best regards,

Ey-Chih Chow    



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/corresponding-sql-for-query-against-LocalRelation-tp26093.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Re: corresponding sql for query against LocalRelation

Posted by Jeff Zhang <zj...@gmail.com>.
I think LocalRelation is used for dataframe,

>> val df = sqlContext.createDataFrame(Seq((1,"jeff"),(2, "andy")))
>> df.explain(true)

== Parsed Logical Plan ==
LocalRelation [_1#0,_2#1], [[1,jeff],[2,andy]]

== Analyzed Logical Plan ==
_1: int, _2: string
LocalRelation [_1#0,_2#1], [[1,jeff],[2,andy]]

== Optimized Logical Plan ==
LocalRelation [_1#0,_2#1], [[1,jeff],[2,andy]]

== Physical Plan ==
LocalTableScan [_1#0,_2#1], [[1,jeff],[2,andy]]

On Thu, Jan 28, 2016 at 10:18 AM, ey-chih chow <ey...@hotmail.com> wrote:

> Hi,
>
> For a query against the LocalRelation, is there anybody know what does the
> corresponding SQL looks like?  Thanks.
>
> Best regards,
>
> Ey-Chih Chow
>
>
>
> --
> View this message in context:
> http://apache-spark-user-list.1001560.n3.nabble.com/corresponding-sql-for-query-against-LocalRelation-tp26093.html
> Sent from the Apache Spark User List mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>
>


-- 
Best Regards

Jeff Zhang