scala
[spark] where과 filter의 차이
'김용환'
2017. 5. 23. 11:17
filter는 dataframe에서 where를 spark sql에서 사용하는데,
이 둘의 차이가 무엇일까 살펴봤더니..
where는 filter의 앨리어스라 한다.
https://spark.apache.org/docs/1.5.2/api/scala/index.html#org.apache.spark.sql.DataFrame
defwhere(condition: Column): DataFrame
결국은 아래 함수의 결과는 동일하다.
employee.filter($"age" > 15)
employee.where($"age" > 15)
Filters rows using the given condition. This is an alias for
filter
.