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 2021/07/07 11:22:10 UTC

[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #6114: fix bug on colocate agg (name error)

EmmyMiao87 commented on a change in pull request #6114:
URL: https://github.com/apache/incubator-doris/pull/6114#discussion_r665279221



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
##########
@@ -134,8 +134,16 @@ public boolean columnEqual(Expr srcExpr) {
             srcTableName = srcSlotRef.getTableName();
         }
         TableName thisTableName = tblName;
-        if (thisTableName == null && desc != null) {
-            thisTableName = getTableName();
+        if (desc != null && desc.getParent() != null && desc.getParent().getRef() != null) {
+            thisTableName = desc.getParent().getRef().getName();
+        } else if (!desc.getSourceExprs().isEmpty()) {
+            List<Expr> sourceExprs = desc.getSourceExprs();
+            Expr sourceExpr = sourceExprs.get(0);
+            if (((SlotRef) sourceExpr).desc != null && ((SlotRef) sourceExpr).desc.getParent() != null) {

Review comment:
       This value does not have to be slotREF

##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
##########
@@ -134,8 +134,16 @@ public boolean columnEqual(Expr srcExpr) {
             srcTableName = srcSlotRef.getTableName();
         }
         TableName thisTableName = tblName;
-        if (thisTableName == null && desc != null) {
-            thisTableName = getTableName();
+        if (desc != null && desc.getParent() != null && desc.getParent().getRef() != null) {
+            thisTableName = desc.getParent().getRef().getName();
+        } else if (!desc.getSourceExprs().isEmpty()) {
+            List<Expr> sourceExprs = desc.getSourceExprs();
+            Expr sourceExpr = sourceExprs.get(0);

Review comment:
       source exprs get (0) ? how about others?




-- 
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: commits-unsubscribe@doris.apache.org

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