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 2023/01/05 17:38:31 UTC

[GitHub] [doris] Kikyou1997 opened a new pull request, #15664: [feature](nereids) Support syntax: (select orderby ) union all (select...)

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

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [ ] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [ ] 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] morrySnow commented on a diff in pull request #15664: [feature](nereids) Support syntax: (select orderby ) union all (select...)

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


##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -53,11 +57,12 @@ planType
 
 //  -----------------Query-----------------
 query
-    : cte? queryTerm queryOrganization
+    : {!doris_legacy_SQL_syntax}? cte? queryTerm queryOrganization
+    | {doris_legacy_SQL_syntax}? queryTerm
     ;
 
 queryTerm
-    : queryPrimary                                                                       #queryTermDefault
+    : queryPrimary                                                                      #queryTermDefault

Review Comment:
   add back removed blank



##########
regression-test/suites/nereids_syntax_p0/set_operation.groovy:
##########
@@ -242,4 +241,9 @@ suite("test_nereids_set_operation") {
     INTERSECT
     SELECT k1 FROM setOperationTable WHERE k2 > 0)
     """
+
+    order_qt_select43 """
+        SELECT * FROM (select k1, k3 from setOperationTableNotNullable order by k3 union all 
+            select k1, k5 from setOperationTable) t;
+    """

Review Comment:
   add more case, to test all situation of legacy planner's syntax. such as set operation, w/ and w/o parenthesis, w/ and w/o cte and w/ and w/o query organization



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -70,15 +75,17 @@ setQuantifier
 queryPrimary
     : querySpecification                                                    #queryPrimaryDefault
     | TABLE multipartIdentifier                                             #table
-    | LEFT_PAREN query RIGHT_PAREN                                          #subquery
+    | LEFT_PAREN query RIGHT_PAREN                                      #subquery

Review Comment:
   ditto



-- 
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 #15664: [feature](nereids) let set operation syntax campatible with lagecy planner

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

   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 #15664: [feature](nereids) Support syntax: (select orderby ) union all (select...)

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


##########
regression-test/suites/nereids_syntax_p0/set_operation.groovy:
##########
@@ -242,4 +241,9 @@ suite("test_nereids_set_operation") {
     INTERSECT
     SELECT k1 FROM setOperationTable WHERE k2 > 0)
     """
+
+    order_qt_select43 """
+        SELECT * FROM (select k1, k3 from setOperationTableNotNullable order by k3 union all 
+            select k1, k5 from setOperationTable) t;
+    """

Review Comment:
   add more case, to test all situation of legacy planner's syntax. such as set operation, w/ and w/o parenthesis, w/ and w/o cte and w/ and w/o query organization. Maybe UT is more appropriate



-- 
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 #15664: [feature](nereids) Support syntax: (select orderby ) union all (select...)

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

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 35.76 seconds
    load time: 649 seconds
    storage size: 17122998827 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230105194418_clickbench_pr_74497.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] github-actions[bot] commented on pull request #15664: [feature](nereids) let set operation syntax campatible with lagecy planner

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

   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] morrySnow merged pull request #15664: [feature](nereids) let set operation syntax campatible with lagecy planner

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


-- 
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] Kikyou1997 commented on a diff in pull request #15664: [feature](nereids) Support syntax: (select orderby ) union all (select...)

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


##########
regression-test/suites/nereids_syntax_p0/set_operation.groovy:
##########
@@ -242,4 +241,9 @@ suite("test_nereids_set_operation") {
     INTERSECT
     SELECT k1 FROM setOperationTable WHERE k2 > 0)
     """
+
+    order_qt_select43 """
+        SELECT * FROM (select k1, k3 from setOperationTableNotNullable order by k3 union all 
+            select k1, k5 from setOperationTable) t;
+    """

Review Comment:
   done



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