Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/12710#discussion_r61156270
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/TungstenAggregate.scala
---
@@ -447,16 +447,31 @@ case class TungstenAggregate(
}
}
+ /**
+ * Using the vectorized hash map in TungstenAggregate is currently
supported for all primitive
+ * data types during partial aggregation. However, we currently only
enable the hash map for a
+ * subset of cases that've been verified to show performance
improvements on our benchmarks
+ * subject to an internal conf that sets an upper limit on the maximum
length of the aggregate
+ * key/value schema.
+ *
+ * This list of supported use-cases should be expanded over time.
+ */
+ private def enableVectorizedHashMap(ctx: CodegenContext): Boolean = {
+ val isSupported =
+ (groupingKeySchema ++ bufferSchema).forall(f =>
ctx.isPrimitiveType(f.dataType) ||
+ f.dataType.isInstanceOf[DecimalType] ||
f.dataType.isInstanceOf[StringType]) &&
+ bufferSchema.forall(!_.dataType.isInstanceOf[StringType]) &&
bufferSchema.nonEmpty &&
--- End diff --
bufferSchema can't have StringType in TungstenAggregate
---
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]