Github user WeichenXu123 commented on the issue:
https://github.com/apache/spark/pull/17419
As the dataframe version is much slower than RDD version (currently test
against vector of size 1)
I also guess there is some performance issue in
`ObjectAggregationIterator.processInput()`
in the following code block:
```
private def processInputs(): Unit = {
// ...
if (groupingExpressions.isEmpty) {
// If there is no grouping expressions, we can just reuse the same
buffer over and over again.
val groupingKey = groupingProjection.apply(null)
val buffer: InternalRow = getAggregationBufferByKey(hashMap,
groupingKey)
while (inputRows.hasNext) {
val newInput = safeProjection(inputRows.next())
processRow(buffer, newInput)
}
}
...
```
This statement `val newInput = safeProjection(inputRows.next())` maybe do
some redundant data copy (for walk-around some bugs?)
cc @cloud-fan @liancheng
---
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]