0

I need to use window function in spark scala.
Spark version is 1.5.1 and scala is 2.11.7

There is a similar question (Using windowing functions in Spark)

But, in my case, there is no hive. I can't import org.apache.spark.sql.hive.HiveContext.

"By inheritance, HiveContext is actually an SQLContext" but, my case is not.

scala> sqlContext
res2: org.apache.spark.sql.SQLContext = org.apache.spark.sql.SQLContext@1136122a

Is there way to use window function?? thanks.

Community
  • 1
  • 1
kanghyuk
  • 49
  • 5
  • 2
    How about this: https://stackoverflow.com/questions/32407455/spark-and-sparksql-how-to-imitate-window-function – Justin Pihony Apr 08 '16 at 04:53
  • @JustinPihony is right ! You can try to mimic window functions if you don't wish to add the hive dependency. Nevertheless, I have answered that question 3 or 4 times (1 of them is the link provided). You really need to read those answers carefully – eliasah Apr 08 '16 at 05:52
  • Here is one other http://stackoverflow.com/a/36398242/3415409 – eliasah Apr 08 '16 at 05:54

0 Answers0