gengliangwang commented on code in PR #38151:
URL: https://github.com/apache/spark/pull/38151#discussion_r991540251
##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/util/CharVarcharCodegenUtils.java:
##########
@@ -52,4 +52,15 @@ public static UTF8String
varcharTypeWriteSideCheck(UTF8String inputStr, int limi
return trimTrailingSpaces(inputStr, numChars, limit);
}
}
+
+ public static UTF8String readSidePadding(UTF8String inputStr, int limit) {
+ int numChars = inputStr.numChars();
+ if (numChars == limit) {
+ return inputStr;
+ } else if (numChars < limit) {
+ return inputStr.rpad(limit, SPACE);
+ } else {
+ return inputStr;
Review Comment:
We need a test case for this branch, no matter what the expected behavior is.
--
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]