lowka commented on code in PR #2690:
URL: https://github.com/apache/ignite-3/pull/2690#discussion_r1367087044
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/IgniteMethod.java:
##########
@@ -122,6 +128,25 @@ public enum IgniteMethod {
method = Types.lookupMethod(clazz, methodName, argumentTypes);
}
+ /**
+ * Constructor that allows to specify overloaded methods as SQL function
implementations.
+ *
+ * @param clazz Class where to lookup method.
+ * @param methodName Method name.
+ * @param overloadedMethod If {@code true} to looks up overloaded methods,
otherwise looks up a method w/o parameters.
+ */
+ IgniteMethod(Class<?> clazz, String methodName, boolean overloadedMethod) {
+ if (overloadedMethod) {
+ // Allow calcite to select appropriate method at a call site.
+ this.method = Arrays.stream(IgniteSqlFunctions.class.getMethods())
Review Comment:
That was a typo. Thanks, fixed it.
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItFunctionsTest.java:
##########
@@ -344,6 +351,193 @@ public void testSubstr() {
assertThrowsWithCause(() -> sql("SELECT SUBSTR('1234567', 1, -3)"),
IgniteException.class, "negative substring length");
}
+ /** Test cases for ROUND function that accepts integral numeric types. */
+ @TestFactory
+ public Stream<DynamicTest> testRoundIntegral() {
Review Comment:
Done.
--
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]