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 2022/11/30 03:59:53 UTC

[GitHub] [doris] sohardforaname opened a new pull request, #14693: [Enhancement](Nereids)add RelationId to unboundRelation

sohardforaname opened a new pull request, #14693:
URL: https://github.com/apache/doris/pull/14693

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   add RelationId to unboundRelation and refactor some ut used RelationUtil to allocate next RelationId.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [x] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [x] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [x] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [x] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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


[GitHub] [doris] github-actions[bot] commented on pull request #14693: [Enhancement](Nereids)add RelationId to unboundRelation

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14693:
URL: https://github.com/apache/doris/pull/14693#issuecomment-1346073569

   PR approved by anyone and no changes requested.


-- 
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


[GitHub] [doris] github-actions[bot] commented on pull request #14693: [Enhancement](Nereids)add RelationId to unboundRelation

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14693:
URL: https://github.com/apache/doris/pull/14693#issuecomment-1346073467

   PR approved by at least one committer and no changes requested.


-- 
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


[GitHub] [doris] morrySnow commented on a diff in pull request #14693: [Enhancement](Nereids)add RelationId to unboundRelation

Posted by GitBox <gi...@apache.org>.
morrySnow commented on code in PR #14693:
URL: https://github.com/apache/doris/pull/14693#discussion_r1037990501


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/analyzer/UnboundRelation.java:
##########
@@ -42,34 +43,37 @@
  */
 public class UnboundRelation extends LogicalLeaf implements Relation, Unbound {
     private final List<String> nameParts;
+    private final RelationId id;

Review Comment:
   it is better add 2 new abstract class: `AbstractLogicalRelation`, `AbstractPhysicalRelation` and put common attributes in them



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/memo/GroupExpression.java:
##########
@@ -233,9 +233,8 @@ public boolean equals(Object o) {
             return false;
         }
         GroupExpression that = (GroupExpression) o;
-        // TODO: add relation id to UnboundRelation
-        if (plan instanceof UnboundRelation) {
-            return false;
+        if (this.plan instanceof UnboundRelation) {
+            return plan.equals(that.plan);

Review Comment:
   remove this. fix `computeLogicalProperties` in `AbstractLogicalPlan`. Let it return `UnboundLogicalProperties.INSTANCE` when current object is instance of `Unbound`



-- 
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


[GitHub] [doris] hello-stephen commented on pull request #14693: [Enhancement](Nereids)add RelationId to unboundRelation

Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #14693:
URL: https://github.com/apache/doris/pull/14693#issuecomment-1331629254

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 35.08 seconds
    load time: 428 seconds
    storage size: 17123343164 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221130042653_clickbench_pr_55263.html


-- 
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


[GitHub] [doris] morrySnow commented on a diff in pull request #14693: [Enhancement](Nereids)add RelationId to unboundRelation

Posted by GitBox <gi...@apache.org>.
morrySnow commented on code in PR #14693:
URL: https://github.com/apache/doris/pull/14693#discussion_r1042061301


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java:
##########
@@ -92,7 +93,7 @@ private LogicalPlan bindWithCurrentDb(CascadesContext cascadesContext, String ta
         Table table = getTable(dbName, tableName, cascadesContext.getConnectContext().getEnv());
         // TODO: should generate different Scan sub class according to table's type
         if (table.getType() == TableType.OLAP) {
-            return new LogicalOlapScan(cascadesContext.getStatementContext().getNextRelationId(),
+            return new LogicalOlapScan(RelationUtil.newRelationId(),

Review Comment:
   use unbound relation's id



-- 
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


[GitHub] [doris] morrySnow merged pull request #14693: [Enhancement](Nereids)add RelationId to unboundRelation

Posted by GitBox <gi...@apache.org>.
morrySnow merged PR #14693:
URL: https://github.com/apache/doris/pull/14693


-- 
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