LuciferYang commented on code in PR #60025:
URL: https://github.com/apache/spark/pull/60025#discussion_r4450654498


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/V2ExpressionBuilder.scala:
##########
@@ -484,12 +484,8 @@ class V2ExpressionBuilder(e: Expression, isPredicate: 
Boolean = false) extends L
     }
   }
 
-  private def isCharReadSidePaddingInvoke(invoke: StaticInvoke): Boolean = {
-    invoke.scalarFunction.isEmpty &&
-      invoke.staticObject == classOf[CharVarcharCodegenUtils] &&
-      invoke.functionName == CharVarcharUtils.READ_SIDE_PADDING &&
-      invoke.arguments.length == 2
-  }
+  private def isCharReadSidePaddingInvoke(invoke: StaticInvoke): Boolean =

Review Comment:
   Done in 51688d2ba39. `ReadSidePadding` returns the child and the length, 
`isCharReadSidePaddingInvoke` and `charPadLength` are gone, and the call sites 
match the extractor directly, with `Literal(n: Int, _)` where they need the 
length.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/statsEstimation/FilterEstimation.scala:
##########
@@ -170,7 +171,14 @@ case class FilterEstimation(
    *         It returns None if the condition is not supported.
    */
   def calculateSingleCondition(condition: Expression, update: Boolean): 
Option[Double] = {
-    condition match {
+    // A predicate pushed below a read-side CHAR padding Project compares the 
padding expression

Review Comment:
   Done in 51688d2ba39. The rule is in the scaladoc now and the inline comment 
is gone.



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

Reply via email to