morrySnow commented on code in PR #67737:
URL: https://github.com/apache/doris/pull/67737#discussion_r4079921131
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Cast.java:
##########
@@ -316,26 +319,46 @@ public static boolean mayFailOnNonNullInput(DataType
sourceType, DataType target
return false;
}
- // BE casts to a character type through to_string_batch for these
source types.
- // JSON and VARIANT take separate paths and are intentionally left
conservative.
- boolean concreteNumber = (sourceType.isIntegralType() &&
sourceType.width() > 0)
- || sourceType.isFloatLikeType() ||
sourceType.isDecimalLikeType();
+ // Every valid typed value has a string representation. The generic
serde path and the
+ // dedicated JSON/VARIANT paths do not report data-dependent
conversion failures.
if (targetType.isStringLikeType()) {
- return !(sourceType.isStringLikeType() ||
sourceType.isBooleanType() || concreteNumber
- || sourceType.isDateLikeType() || sourceType.isTimeType()
- || sourceType.isArrayType() || sourceType.isMapType() ||
sourceType.isStructType());
+ return false;
Review Comment:
should not change mayFailOnNonNullInput, this is only affect storage layer
aggregate
--
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]