Mamed
Mamed

Reputation: 772

Value === is not a member of a string

val columnsToSum = privacyColumnsName.reduce((left, right) => (left)+ (right))

Then:

privacy = privacy.withColumn("Result",when(columnsToSum === privacyColumnsName.size,1).otherwise(0))

I get:

Error:(111, 63) value === is not a member of String privacy = privacy.withColumn("Result",when(columnsToSum === privacyColumnsName.size,1).otherwise(0))

I have tried with == and equals, the same error is thrown.

Upvotes: 0

Views: 4106

Answers (1)

Andronicus
Andronicus

Reputation: 26056

You need to import spark implicits:

val spark: SparkSession = ...
import spark.implicits._

Upvotes: 2

Related Questions