spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yeikel <em...@yeikel.com>
Subject Re: "where" clause able to access fields not in its schema
Date Thu, 14 Feb 2019 05:07:05 GMT
It seems that we are using the function incorrectly. 


    val a = Seq((1,10),(2,20)).toDF("foo","bar")

    val b = a.select($"foo")

    val c = b.where(b("bar") === 20)

    c.show


  Exception in thread "main" org.apache.spark.sql.AnalysisException: Cannot
resolve column name "bar" among   (foo);






--
Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org


Mime
View raw message