carlvinhust2012 commented on code in PR #11649:
URL: https://github.com/apache/doris/pull/11649#discussion_r942348544
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java:
##########
@@ -269,15 +270,28 @@ public void analyze() throws AnalysisException {
// this cast may result in loss of precision, but the user requested it
if (childType.matchesType(type)) {
- // For types which has precision and scale, we also need to check
quality between precisions and scales
- if (!PrimitiveType.typeWithPrecision.contains(
- type.getPrimitiveType()) || ((((ScalarType)
type).decimalPrecision()
- == ((ScalarType) childType).decimalPrecision()) &&
(((ScalarType) type).decimalScale()
- == ((ScalarType) childType).decimalScale()))) {
+ if
(PrimitiveType.typeWithPrecision.contains(type.getPrimitiveType())) {
Review Comment:
Are you sure that the 3 "if" branches all set the 'noOp = true' ?
--
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]