Thanks for your reply!
I know what's going on now.
"Herman van Hövell tot Westerflier-2 [via Apache Spark Developers
List]" wroted at 2017-03-08 21:35:
You are seeing a bug in the Hive parser. Hive drops the window clause when it
encounters a count(distinct ...). See
https://issues.apache
You are seeing a bug in the Hive parser. Hive drops the window clause when
it encounters a count(distinct ...). See
https://issues.apache.org/jira/browse/HIVE-10141 for more information.
Spark 1.6 plans this as a regular distinct aggregate (dropping the window
clause), which is wrong. Spark 2.x us