matriv commented on a change in pull request #18063:
URL: https://github.com/apache/flink/pull/18063#discussion_r767662366



##########
File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/casting/CharVarCharTrimPadCastRule.java
##########
@@ -43,19 +43,18 @@
  * the one specified by the precision of the target {@link 
LogicalTypeRoot#CHAR} or {@link
  * LogicalTypeRoot#VARCHAR} type.
  */
-class CharacterFamilyTrimmingAndPaddingCastRule
-        extends AbstractNullAwareCodeGeneratorCastRule<StringData, StringData> 
{
+class CharVarCharTrimPadCastRule
+        extends AbstractNullAwareCodeGeneratorCastRule<Object, StringData> {
 
-    static final CharacterFamilyTrimmingAndPaddingCastRule INSTANCE =
-            new CharacterFamilyTrimmingAndPaddingCastRule();
+    static final CharVarCharTrimPadCastRule INSTANCE = new 
CharVarCharTrimPadCastRule();
 
-    private CharacterFamilyTrimmingAndPaddingCastRule() {
+    private CharVarCharTrimPadCastRule() {
         super(
                 CastRulePredicate.builder()
                         .predicate(
                                 (inputType, targetType) ->
                                         
targetType.is(LogicalTypeFamily.CHARACTER_STRING)
-                                                && !isStringType(targetType))
+                                                && 
!targetType.equals(STRING_TYPE))

Review comment:
       Nope, because this is a `not equals`.




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