Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/16417#discussion_r94035792
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
---
@@ -553,11 +580,36 @@ class CodegenContext {
}
"""
addNewFunction(compareFunc, funcCode)
- s"this.$compareFunc($c1, $c2)"
+ s"$compareFunc($c1, $c2)"
case schema: StructType =>
- INPUT_ROW = "i"
- val comparisons = GenerateOrdering.genComparisons(this, schema)
val compareFunc = freshName("compareStruct")
+ val compareFields = schema.zipWithIndex.map {
--- End diff --
the previous comparison code does not work in whole-stage codegen, as it
mutate the `INPUT_ROW`.
---
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]