morrySnow commented on code in PR #26180:
URL: https://github.com/apache/doris/pull/26180#discussion_r1378678313


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/Count.java:
##########
@@ -82,11 +81,8 @@ public void checkLegalityBeforeTypeCoercion() {
     public void checkLegalityAfterRewrite() {
         // after rewrite, count(distinct bitmap_column) should be rewritten to 
bitmap_union_count(bitmap_column)
         for (Expression argument : getArguments()) {
-            if (argument.getDataType().isObjectType()) {
-                throw new AnalysisException(Type.OnlyObjectTypeErrorMsg);
-            }
-            if (distinct && argument.getDataType().isComplexType()) {
-                throw new AnalysisException("COUNT DISTINCT could not process 
complex type " + this.toSql());
+            if (distinct && (argument.getDataType().isComplexType() || 
argument.getDataType().isObjectType())) {

Review Comment:
   json is work well?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/Count.java:
##########
@@ -82,11 +81,8 @@ public void checkLegalityBeforeTypeCoercion() {
     public void checkLegalityAfterRewrite() {
         // after rewrite, count(distinct bitmap_column) should be rewritten to 
bitmap_union_count(bitmap_column)
         for (Expression argument : getArguments()) {
-            if (argument.getDataType().isObjectType()) {
-                throw new AnalysisException(Type.OnlyObjectTypeErrorMsg);
-            }
-            if (distinct && argument.getDataType().isComplexType()) {
-                throw new AnalysisException("COUNT DISTINCT could not process 
complex type " + this.toSql());
+            if (distinct && (argument.getDataType().isComplexType() || 
argument.getDataType().isObjectType())) {

Review Comment:
   json is work well?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to