kangkaisen commented on pull request #4666:
URL: https://github.com/apache/incubator-doris/pull/4666#issuecomment-699622904


   I think a more simple way to fix this issue is:
   
   ```
        @Override
        protected Expr uncheckedCastTo(Type targetType) throws 
AnalysisException {
   -        if (targetType.isFloatingPointType()) {
   +        if (targetType.isDecimal() || targetType.isDecimalV2()) {
   +            return this;
   +        } else if (targetType.isFloatingPointType()) {
   
   @@ -769,7 +749,9 @@ public class FunctionSet {
            final Type[] candicateArgTypes = candicate.getArgs();
            if (functionName.equalsIgnoreCase("hex")
                    || functionName.equalsIgnoreCase("greast")
   -                || functionName.equalsIgnoreCase("least")) {
   +                || functionName.equalsIgnoreCase("least")
   +                || functionName.equalsIgnoreCase("lead")
   +                || functionName.equalsIgnoreCase("lag")) {
   ```
   My fixed way has been passed a lot of tests.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to