vvysotskyi commented on code in PR #2638: URL: https://github.com/apache/drill/pull/2638#discussion_r972233224
########## exec/java-exec/src/main/java/org/apache/drill/exec/resolver/DefaultFunctionResolver.java: ########## @@ -58,27 +56,20 @@ public DrillFuncHolder getBestMatch(List<DrillFuncHolder> methods, FunctionCall } } - if (bestcost < 0) { + if (bestcost == Float.POSITIVE_INFINITY) { //did not find a matched func implementation, either w/ or w/o implicit casts //TODO: raise exception here? return null; - } else { - if (AssertionUtil.isAssertionsEnabled() && bestMatchAlternatives.size() > 0) { - /* - * There are other alternatives to the best match function which could have been selected - * Log the possible functions and the chose implementation and raise an exception - */ - logger.error("Chosen function impl: " + bestmatch.toString()); - - // printing the possible matches - logger.error("Printing all the possible functions that could have matched: "); - for (DrillFuncHolder holder: bestMatchAlternatives) { - logger.error(holder.toString()); - } + } + if (bestMatchAlternatives.size() > 0) { Review Comment: If we raise the error it means we have some error related to conversion costs and should adjust them to fix it. -- 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: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org