You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/09/27 11:29:44 UTC
[GitHub] [incubator-doris] kangkaisen commented on pull request #4666: Fix Windows function lag()/lead() function throw AnalysisException.
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org