Skip to content

Commit

Permalink
Self review
Browse files Browse the repository at this point in the history
  • Loading branch information
libenchao committed Dec 1, 2023
1 parent d7be435 commit b0fef64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/apache/calcite/rex/RexUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1700,7 +1700,7 @@ public static boolean isLosslessCast(RelDataType source, RelDataType target) {
sourceLength += source.getScale() + 1; // include decimal mark
}
final int targetPrecision = target.getPrecision();
return targetPrecision == PRECISION_NOT_SPECIFIED || target.getPrecision() >= sourceLength;
return targetPrecision == PRECISION_NOT_SPECIFIED || targetPrecision >= sourceLength;
}
// Return FALSE by default
return false;
Expand Down

0 comments on commit b0fef64

Please sign in to comment.