xiedeyantu commented on code in PR #5050:
URL: https://github.com/apache/calcite/pull/5050#discussion_r3542506384
##########
core/src/main/java/org/apache/calcite/adapter/enumerable/EnumUtils.java:
##########
@@ -112,6 +113,36 @@ private EnumUtils() {}
public static final List<String> LEFT_RIGHT =
ImmutableList.of("left", "right");
+ /** Converts a FETCH or OFFSET value to the representation
+ * supported by the enumerable runtime. */
+ public static BigDecimal numberToBigDecimalLimit(Object value, String kind) {
+ return numberToBigDecimalLimit(value, kind,
FetchOffsetRoundingPolicy.NONE);
+ }
+
+ /** Converts a FETCH or OFFSET value to the representation
+ * supported by the enumerable runtime. */
+ public static BigDecimal numberToBigDecimalLimit(Object value, String kind,
Review Comment:
Could you explain the purpose of adding "Limit" to the name of the method
"numberToBigDecimalLimit"? Or could you simply name it "numberToBigDecimal" and
explain what the method does using the Javadoc?
##########
core/src/test/java/org/apache/calcite/test/JdbcTest.java:
##########
@@ -5793,6 +5793,211 @@ private CalciteAssert.AssertQuery withEmpDept(String
sql) {
Matchers.returnsUnordered("name=Eric"));
}
+ @Test void testPreparedOffsetFetchWithBigDecimal() {
Review Comment:
Please add a Jira link to all test methods. You can refer to other test
cases for more information.
--
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]