Liu Jian created SPARK-32355:
--------------------------------

             Summary: 使用Structured Streaming窗口统计不能实现topN
                 Key: SPARK-32355
                 URL: https://issues.apache.org/jira/browse/SPARK-32355
             Project: Spark
          Issue Type: IT Help
          Components: Java API
    Affects Versions: 2.4.0
            Reporter: Liu Jian


{quote} 
{code:java}
//代码占位符
Dataset<Row> result = ds.groupBy(functions.window(ds.col("_c1"), "1 minutes", 
"1 minutes"), ds.col("_c0")).agg(functions.first("_c2"), 
functions.last("_c2")).sort("_c1");{code}
 

 

例如:_c1是数据时间,窗口统计之后还想根据时间排序,并取出第一条和最后一条,却实现不了! 感觉spark的Structured 
Streaming实现不了。请问这个需求怎么 实现呢?
{quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to