[pick](cast)Feature cast complexttype2 json (#38632)
## Proposed changes backport: https://github.com/apache/doris/pull/36548 Issue Number: close #xxx <!--Describe your changes.-->
This commit is contained in:
@ -833,6 +833,9 @@ public abstract class Type {
|
||||
}
|
||||
|
||||
public static boolean canCastTo(Type sourceType, Type targetType) {
|
||||
if (targetType.isJsonbType() && sourceType.isComplexType()) {
|
||||
return true;
|
||||
}
|
||||
if (sourceType.isVariantType() && (targetType.isScalarType() || targetType.isArrayType())) {
|
||||
// variant could cast to scalar types and array
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user