voonhous commented on code in PR #20457:
URL: https://github.com/apache/hudi/pull/20457#discussion_r4420067672


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/BaseHoodieCatalystExpressionUtils.scala:
##########
@@ -83,9 +83,9 @@ abstract class BaseHoodieCatalystExpressionUtils extends 
HoodieCatalystExpressio
         // Binary
         case Add(OrderPreservingTransformation(attrRef), _, _) => Some(attrRef)
         case Add(_, OrderPreservingTransformation(attrRef), _) => Some(attrRef)
-        case Multiply(OrderPreservingTransformation(attrRef), _, _) => 
Some(attrRef)
-        case Multiply(_, OrderPreservingTransformation(attrRef), _) => 
Some(attrRef)
-        case Divide(OrderPreservingTransformation(attrRef), _, _) => 
Some(attrRef)
+        case Multiply(OrderPreservingTransformation(attrRef), factor, _) if 
isPositiveNumericLiteral(factor) => Some(attrRef)

Review Comment:
   Fixed in 4e7b33724f20: both `Add` arms now require the other operand to be 
reference-free, so `A + A * -2` no longer matches. Your example is added to 
`testNegativeFactorSource` (file kept) along with a matcher unit test.



-- 
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]

Reply via email to