eldenmoon commented on code in PR #47890:
URL: https://github.com/apache/doris/pull/47890#discussion_r1974714548


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java:
##########
@@ -154,8 +154,8 @@ public CastExpr(Type targetType, Expr e, Void v) {
             Type from = getActualArgTypes(collectChildReturnTypes())[0];
             Type to = getActualType(type);
             NullableMode nullableMode = TYPE_NULLABLE_MODE.get(Pair.of(from, 
to));
-            // for complex type cast to jsonb we make ret is always nullable
-            if (from.isComplexType() && type.isJsonbType()) {
+            // for complex type cast to jsonb|variant we make ret is always 
nullable
+            if (from.isComplexType() && (type.isJsonbType() || 
type.isVariantType())) {

Review Comment:
   also add case



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to