srielau commented on code in PR #59716:
URL: https://github.com/apache/spark/pull/59716#discussion_r4353057361


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/V2ExpressionBuilder.scala:
##########
@@ -377,6 +377,17 @@ class V2ExpressionBuilder(e: Expression, isPredicate: 
Boolean = false) extends L
         case _ =>
           None
       }
+    // Scan CHAR padding is a JVM invoke; V2 only has RPAD. This matches local 
eval when the
+    // stored length is <= n (pad-or-keep then equals truncating RPAD). 
Over-long values would
+    // be truncated remotely. charTypeReadSideCheck is left untranslated so 
length errors stay

Review Comment:
   Follow-up: we dropped the kill switch. JDBC no longer compiles this as RPAD 
(or any pad function). The V2 name is still not SQL RPAD, so a connector that 
only allowlists RPAD does not pick up CHAR-scan rewrite. JDBC compiles 
CHAR_READ_SIDE_PADDING as the column and keeps the padded literal, which is the 
predicate that used to push before read-side padding wrapped the scan.



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