Copilot commented on code in PR #13229:
URL: https://github.com/apache/gluten/pull/13229#discussion_r4595549859
##########
backends-velox/src/main/scala/org/apache/gluten/backendsapi/velox/VeloxSparkPlanExecApi.scala:
##########
@@ -1442,6 +1474,39 @@ class VeloxSparkPlanExecApi extends SparkPlanExecApi
with Logging {
expr: Expression,
attributeSeq: Seq[Attribute]): Option[ExpressionTransformer] = {
expr match {
+ case SparkRightShape(str, len, original) =>
+ // `substraitExprName` is the outer `if`. If any function in Spark's
replacement or in the
+ // converted expression is blacklisted, keep Spark's replacement,
which Gluten converts or
+ // falls back as usual.
+ val blacklist = GlutenConfig.get.expressionBlacklist
+ val usedFunctions =
+ Seq(
+ substraitExprName,
+ ExpressionNames.RIGHT,
+ ExpressionNames.IS_NULL,
+ ExpressionNames.SUBSTRING)
Review Comment:
The blacklist check omits `negative` and `lte`, although Spark's replacement
contains both `UnaryMinus` and `LessThanOrEqual` (mapped independently in
ExpressionMappings.scala:42,55). With either name blacklisted, this hook still
emits native `right`: returning a transformer bypasses recursive conversion and
therefore the normal blacklist checks for those nodes. Include both names here
so these settings preserve the existing fallback behavior, and extend the
blacklist test to cover them.
--
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]