Commit 1b4fb15e authored by 王志伟's avatar 王志伟

repair bug

parent 10e33b9e
...@@ -57,12 +57,14 @@ object testt { ...@@ -57,12 +57,14 @@ object testt {
|group by diary_id |group by diary_id
""".stripMargin """.stripMargin
) )
view_count.show()
view_count.createOrReplaceTempView("temp") view_count.createOrReplaceTempView("temp")
val avg = sc.sql( val avg = sc.sql(
s""" s"""
|select diary_id,dur_time,num_clk,(dur_time/num_clk) as avg |select diary_id,dur_time,num_clk,(dur_time/num_clk) as avg
|from temp |from temp
|order by avg desc
""".stripMargin """.stripMargin
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment