eldenmoon commented on code in PR #65561:
URL: https://github.com/apache/doris/pull/65561#discussion_r3656265490
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/check/CheckCast.java:
##########
@@ -356,9 +356,17 @@ public static boolean check(DataType originalType,
DataType targetType, boolean
public static boolean check(DataType originalType, DataType targetType,
boolean isStrictMode, boolean looseAggState) {
if (originalType.isVariantType() && targetType.isVariantType()) {
- // Variant properties describe the source column layout. The
execution value type is
- // still Variant, so operators may align those properties without
changing the value.
- return true;
+ VariantType originalVariantType = (VariantType) originalType;
+ VariantType targetVariantType = (VariantType) targetType;
+ return
originalVariantType.isExecutionCompatibleWith(targetVariantType);
+ }
+ if (originalType.isVariantType() && targetType.isComplexType()) {
Review Comment:
这个if里代码是否能删掉
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/check/CheckCast.java:
##########
@@ -367,6 +375,14 @@ public static boolean check(DataType originalType,
DataType targetType,
if (originalType.isNullType()) {
return true;
}
+ if (targetType.isVariantType()) {
Review Comment:
这个if里代码是否能删掉
--
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]