Skip to content

Commit

Permalink
fix convertHashAggregateExec ReflectionException (#637)
Browse files Browse the repository at this point in the history
WARN BlazeConverters: Error converting exec: HashAggregateExec: expected a member of class HashAggregateExec, you provided value org.apache.spark.sql.execution.aggregate.HashAggregateExec.requiredChildDistributionExpressions
scala.ScalaReflectionException: expected a member of class HashAggregateExec, you provided value org.apache.spark.sql.execution.aggregate.HashAggregateExec.requiredChildDistributionExpressions
        at scala.reflect.runtime.JavaMirrors$JavaMirror.scala$reflect$runtime$JavaMirrors$JavaMirror$$abort(JavaMirrors.scala:155)
        at scala.reflect.runtime.JavaMirrors$JavaMirror.ErrorNotMember(JavaMirrors.scala:161)
        at scala.reflect.runtime.JavaMirrors$JavaMirror.$anonfun$checkMemberOf$1(JavaMirrors.scala:256)
        at scala.reflect.runtime.JavaMirrors$JavaMirror.scala$reflect$runtime$JavaMirrors$JavaMirror$$checkMemberOf(JavaMirrors.scala:246)
        at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaInstanceMirror.reflectField(JavaMirrors.scala:278)
        at scala.reflect.runtime.JavaMirrors$JavaMirror$JavaInstanceMirror.reflectField(JavaMirrors.scala:275)
        at org.apache.spark.sql.blaze.BlazeConverters$.$anonfun$convertHashAggregateExec$1(BlazeConverters.scala:616)
        at scala.collection.immutable.List.map(List.scala:293)
        at org.apache.spark.sql.blaze.BlazeConverters$.convertHashAggregateExec(BlazeConverters.scala:611)
        at org.apache.spark.sql.blaze.BlazeConverters$.$anonfun$convertSparkPlan$15(BlazeConverters.scala:177)
        at org.apache.spark.sql.blaze.BlazeConverters$.tryConvert(BlazeConverters.scala:243)
  • Loading branch information
leizhang5s authored Oct 29, 2024
1 parent bcee889 commit 566b197
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ object BlazeConverters extends Logging {
case "aggregateExpressions" => transformedAggregateExprs
case "groupingExpressions" => transformedGroupingExprs
case "child" => convertProjectExec(ProjectExec(projections, exec.child))
case _ => mirror.reflectField(param.asTerm).get
case _ => mirror.reflectField(typeOf[HashAggregateExec].decl(TermName(param.name.toString)).asTerm).get
}
}
mirror.reflectMethod(copyMethod)(args: _*).asInstanceOf[HashAggregateExec]
Expand Down

0 comments on commit 566b197

Please sign in to comment.