WangGuangxin commented on code in PR #5626:
URL: https://github.com/apache/incubator-gluten/pull/5626#discussion_r1627991908
##########
gluten-core/src/main/scala/org/apache/gluten/utils/PullOutProjectHelper.scala:
##########
@@ -143,8 +144,39 @@ trait PullOutProjectHelper {
ae.copy(aggregateFunction = newAggFunc, filter = newFilter)
}
+ private def needPreComputeRangeFrameBoundary(bound: Expression): Boolean = {
+ bound match {
+ case _: PreComputeRangeFrameBound => false
+ case _ if !bound.foldable => false
+ case _ => true
+ }
+ }
+
+ private def preComputeRangeFrameBoundary(
+ bound: Expression,
+ orderSpec: SortOrder,
+ expressionMap: mutable.HashMap[Expression, NamedExpression]): Expression
= {
+ bound match {
+ case _: PreComputeRangeFrameBound => bound
+ case _ if !bound.foldable => bound
+ case _ if bound.foldable =>
+ val a = expressionMap
+ .getOrElseUpdate(
+ bound.canonicalized,
+ Alias(Add(orderSpec.child, bound), generatePreAliasName)())
Review Comment:
The new added UT succeed in spark3.2, but failed in spark3.4/3.5. I'll fix it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]