xiedeyantu commented on code in PR #4557:
URL: https://github.com/apache/calcite/pull/4557#discussion_r2383658863
##########
core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java:
##########
@@ -556,6 +557,87 @@ public static boolean isExactNumeric(RelDataType type) {
}
}
+ /**
+ * Returns whether {@code container} can represent every value produced by
+ * {@code content} without loss of information.
+ *
+ * <p>The {@code container} type must be one of the integer types (signed or
+ * unsigned). The {@code content} type can be integer, or a DECIMAL with
+ * scale {@code 0}. For all other types this method returns {@code false}.
+ *
+ * @throws IllegalArgumentException if {@code container} is not an integer
type
+ */
+ @API(since = "1.40", status = API.Status.EXPERIMENTAL)
Review Comment:
I agree. Since the
"isLosslessCast" method has already been proven to be stable, I don’t think
the other methods it internally calls need to remain experimental. The core
logic of lossless cast has already been validated, and the current PR is simply
an extension of that same logic. I believe we can directly remove the
annotations (neither marking them as experimental nor stable). What do you
think?
--
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]