Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/8038#discussion_r36683295
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/TungstenAggregationIterator.scala
---
@@ -82,10 +80,12 @@ class TungstenAggregationIterator(
resultExpressions: Seq[NamedExpression],
newMutableProjection: (Seq[Expression], Seq[Attribute]) => (() =>
MutableProjection),
originalInputAttributes: Seq[Attribute],
- inputIter: Iterator[InternalRow],
testFallbackStartsAt: Option[Int])
extends Iterator[UnsafeRow] with Logging {
+ // The parent partition iterator, to be initialized later in `start`
+ private[this] var inputIter: Iterator[InternalRow] =
Iterator[InternalRow]()
--- End diff --
How about we set the initial value to `null`? Just in case when something
is wrong, we will get a NPE instead of silently have a wrong result.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]