-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-14675][SQL] ClassFormatError when use Seq as Aggregator buffer type #12468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,13 +110,17 @@ class CodegenContext { | |
| } | ||
|
|
||
| def declareMutableStates(): String = { | ||
| mutableStates.map { case (javaType, variableName, _) => | ||
| // It's possible that we add same mutable state twice, e.g. the `mergeExpressions` in | ||
| // `TypedAggregateExpression`, we should call `distinct` here to remove the duplicated ones. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we avoid of adding the same mutable state twice?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yea, we can transform the left deserializer in |
||
| mutableStates.distinct.map { case (javaType, variableName, _) => | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need comment explaining the distinct |
||
| s"private $javaType $variableName;" | ||
| }.mkString("\n") | ||
| } | ||
|
|
||
| def initMutableStates(): String = { | ||
| mutableStates.map(_._3).mkString("\n") | ||
| // It's possible that we add same mutable state twice, e.g. the `mergeExpressions` in | ||
| // `TypedAggregateExpression`, we should call `distinct` here to remove the duplicated ones. | ||
| mutableStates.distinct.map(_._3).mkString("\n") | ||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few expressions implement CodegenFallback but only use it in some corner cases