This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 53fed2d [BUG] Fix the bug of query in expr (#6767) (#6768)
53fed2d is described below
commit 53fed2d35eb16112ff9feccdacec1f18feafa788
Author: HappenLee <[email protected]>
AuthorDate: Tue Oct 5 12:26:10 2021 +0800
[BUG] Fix the bug of query in expr (#6767) (#6768)
---
fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
index 5bc130e..7c74d34 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
@@ -1018,6 +1018,13 @@ public abstract class Type {
|| (t1ResultType == PrimitiveType.VARCHAR && t2ResultType ==
PrimitiveType.STRING)) {
return Type.STRING;
}
+
+ // int family type and char family type should cast to char family type
+ if ((t1ResultType.isFixedPointType() && t2ResultType.isCharFamily()) ||
+ (t2ResultType.isFixedPointType() &&
t1ResultType.isCharFamily())) {
+ return t1.isStringType() ? t1 : t2;
+ }
+
if (t1ResultType == PrimitiveType.BIGINT && t2ResultType ==
PrimitiveType.BIGINT) {
return getAssignmentCompatibleType(t1, t2, false);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]