You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/08/02 06:38:45 UTC
[doris] branch dev-1.1.2 updated: [Bug](date function) `from_unixtime` return wrong result (#11410)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
new 046178d523 [Bug](date function) `from_unixtime` return wrong result (#11410)
046178d523 is described below
commit 046178d523f306f8e5345c98e12a2ca8c8d87ff0
Author: Gabriel <ga...@gmail.com>
AuthorDate: Tue Aug 2 14:23:54 2022 +0800
[Bug](date function) `from_unixtime` return wrong result (#11410)
* [Bug](date function) `from_unixtime` return wrong result
---
.../main/java/org/apache/doris/rewrite/RewriteFromUnixTimeRule.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteFromUnixTimeRule.java b/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteFromUnixTimeRule.java
index 0377fde9d8..96b7a088a6 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteFromUnixTimeRule.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/rewrite/RewriteFromUnixTimeRule.java
@@ -102,7 +102,9 @@ public class RewriteFromUnixTimeRule implements ExprRewriteRule {
return expr;
}
// definition: from_unixtime(int, format)
- if (params.exprs().size() != 1 && params.exprs().size() != 2) {
+ // TODO: from_unixtime(col, format) needs to be processed carefully, now only rewrite from_unixtime(col)
+ // to avoid wrong results.
+ if (params.exprs().size() != 1) {
return expr;
}
Expr paramSlot = params.exprs().get(0);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org