Github user tdas commented on a diff in the pull request: https://github.com/apache/spark/pull/21733#discussion_r208483760 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/package.scala --- @@ -81,4 +85,221 @@ package object state { storeCoordinator) } } + + /** + * Base trait for state manager purposed to be used from streaming aggregations. + */ + sealed trait StreamingAggregationStateManager extends Serializable { + + /** + * Extract columns consisting key from input row, and return the new row for key columns. + * + * @param row The input row. + * @return The row instance which only contains key columns. + */ + def getKey(row: InternalRow): UnsafeRow --- End diff -- nit: why is the input typed InternalRow where everything else is UnsafeRow? seems inconsistent.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org