raminqaf commented on code in PR #29279:
URL: https://github.com/apache/flink/pull/29279#discussion_r4102730639


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/expressions/converter/ExpressionConverterTest.java:
##########
@@ -220,4 +226,41 @@ void testUuidLiteralFromBytes() {
         assertThat(((RexLiteral) rex).getValueAs(UUID.class)).isEqualTo(uuid);
         assertThat(rex.getType().getSqlTypeName()).isEqualTo(SqlTypeName.UUID);
     }
+
+    @Test
+    void testCastToNotNullTypeFromNullableInput() {
+        final RexNode rex =
+                convertCast(
+                        valueLiteral(null, DataTypes.INT()),
+                        DataTypes.BIGINT().notNull(),
+                        DataTypes.BIGINT());
+        assertThat(rex.getType().isNullable()).isTrue();
+    }
+
+    @Test
+    void testCastToNotNullTypeFromNestedVariantInput() {
+        final RexNode rex =
+                convertCast(
+                        valueLiteral(null, 
DataTypes.ARRAY(DataTypes.VARIANT())),

Review Comment:
   Right, the input literal is a nullable array, so this only showed nullable 
input → nullable result, which `testCastToNotNullTypeFromNullableInput` already 
covers. Removed.



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