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