You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/10/09 20:58:05 UTC

[jira] [Commented] (SPARK-22230) agg(last('attr)) gives weird results for streaming

    [ https://issues.apache.org/jira/browse/SPARK-22230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16197685#comment-16197685 ] 

Apache Spark commented on SPARK-22230:
--------------------------------------

User 'joseph-torres' has created a pull request for this issue:
https://github.com/apache/spark/pull/19461

> agg(last('attr)) gives weird results for streaming
> --------------------------------------------------
>
>                 Key: SPARK-22230
>                 URL: https://issues.apache.org/jira/browse/SPARK-22230
>             Project: Spark
>          Issue Type: Bug
>          Components: Structured Streaming
>    Affects Versions: 2.2.0
>            Reporter: Jose Torres
>            Priority: Minor
>
> In stream aggregation, last('attr) yields the last value from the first microbatch forever. I'm not sure if it's fair to call this a correctness bug, since last doesn't have strong correctness semantics, but ignoring all rows past the first microbatch is at least weird.
> Simple repro in StreamingAggregationSuite:
>     val input = MemoryStream[Int]
>     val aggregated = input.toDF().agg(last('value))
>     testStream(aggregated, OutputMode.Complete())(
>       AddData(input, 1, 2, 3),
>       CheckLastBatch(3),
>       AddData(input, 4, 5, 6),
>       CheckLastBatch(6) // actually yields 3 again



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org