You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Koert Kuipers <ko...@tresata.com> on 2016/05/03 18:16:59 UTC

SQLContext and "stable identifier required"

with the introduction of SparkSession SQLContext changed from being a lazy
val to a def.
however this is troublesome if you want to do:

import someDataset.sqlContext.implicits._

because it is no longer a stable identifier, i think? i get:
stable identifier required, but someDataset.sqlContext.implicits found.

anyone else seen this?

Re: SQLContext and "stable identifier required"

Posted by Koert Kuipers <ko...@tresata.com>.
sure i can do that

On Tue, May 3, 2016 at 1:21 PM, Reynold Xin <rx...@databricks.com> wrote:

> Probably not. Want to submit a pull request?
>
>
> On Tuesday, May 3, 2016, Koert Kuipers <ko...@tresata.com> wrote:
>
>> yes it works fine if i switch to using the implicits on the SparkSession
>> (which is a val)
>>
>> but do we want to break the old way of doing the import?
>>
>> On Tue, May 3, 2016 at 12:56 PM, Ted Yu <yu...@gmail.com> wrote:
>>
>>> Have you tried the following ?
>>>
>>> scala> import spark.implicits._
>>> import spark.implicits._
>>>
>>> scala> spark
>>> res0: org.apache.spark.sql.SparkSession =
>>> org.apache.spark.sql.SparkSession@323d1fa2
>>>
>>> Cheers
>>>
>>> On Tue, May 3, 2016 at 9:16 AM, Koert Kuipers <ko...@tresata.com> wrote:
>>>
>>>> with the introduction of SparkSession SQLContext changed from being a
>>>> lazy val to a def.
>>>> however this is troublesome if you want to do:
>>>>
>>>> import someDataset.sqlContext.implicits._
>>>>
>>>> because it is no longer a stable identifier, i think? i get:
>>>> stable identifier required, but someDataset.sqlContext.implicits found.
>>>>
>>>> anyone else seen this?
>>>>
>>>>
>>>
>>

Re: SQLContext and "stable identifier required"

Posted by Reynold Xin <rx...@databricks.com>.
Probably not. Want to submit a pull request?

On Tuesday, May 3, 2016, Koert Kuipers <ko...@tresata.com> wrote:

> yes it works fine if i switch to using the implicits on the SparkSession
> (which is a val)
>
> but do we want to break the old way of doing the import?
>
> On Tue, May 3, 2016 at 12:56 PM, Ted Yu <yuzhihong@gmail.com
> <javascript:_e(%7B%7D,'cvml','yuzhihong@gmail.com');>> wrote:
>
>> Have you tried the following ?
>>
>> scala> import spark.implicits._
>> import spark.implicits._
>>
>> scala> spark
>> res0: org.apache.spark.sql.SparkSession =
>> org.apache.spark.sql.SparkSession@323d1fa2
>>
>> Cheers
>>
>> On Tue, May 3, 2016 at 9:16 AM, Koert Kuipers <koert@tresata.com
>> <javascript:_e(%7B%7D,'cvml','koert@tresata.com');>> wrote:
>>
>>> with the introduction of SparkSession SQLContext changed from being a
>>> lazy val to a def.
>>> however this is troublesome if you want to do:
>>>
>>> import someDataset.sqlContext.implicits._
>>>
>>> because it is no longer a stable identifier, i think? i get:
>>> stable identifier required, but someDataset.sqlContext.implicits found.
>>>
>>> anyone else seen this?
>>>
>>>
>>
>

Re: SQLContext and "stable identifier required"

Posted by Koert Kuipers <ko...@tresata.com>.
yes it works fine if i switch to using the implicits on the SparkSession
(which is a val)

but do we want to break the old way of doing the import?

On Tue, May 3, 2016 at 12:56 PM, Ted Yu <yu...@gmail.com> wrote:

> Have you tried the following ?
>
> scala> import spark.implicits._
> import spark.implicits._
>
> scala> spark
> res0: org.apache.spark.sql.SparkSession =
> org.apache.spark.sql.SparkSession@323d1fa2
>
> Cheers
>
> On Tue, May 3, 2016 at 9:16 AM, Koert Kuipers <ko...@tresata.com> wrote:
>
>> with the introduction of SparkSession SQLContext changed from being a
>> lazy val to a def.
>> however this is troublesome if you want to do:
>>
>> import someDataset.sqlContext.implicits._
>>
>> because it is no longer a stable identifier, i think? i get:
>> stable identifier required, but someDataset.sqlContext.implicits found.
>>
>> anyone else seen this?
>>
>>
>

Re: SQLContext and "stable identifier required"

Posted by Ted Yu <yu...@gmail.com>.
Have you tried the following ?

scala> import spark.implicits._
import spark.implicits._

scala> spark
res0: org.apache.spark.sql.SparkSession =
org.apache.spark.sql.SparkSession@323d1fa2

Cheers

On Tue, May 3, 2016 at 9:16 AM, Koert Kuipers <ko...@tresata.com> wrote:

> with the introduction of SparkSession SQLContext changed from being a lazy
> val to a def.
> however this is troublesome if you want to do:
>
> import someDataset.sqlContext.implicits._
>
> because it is no longer a stable identifier, i think? i get:
> stable identifier required, but someDataset.sqlContext.implicits found.
>
> anyone else seen this?
>
>