You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2019/03/14 02:05:50 UTC

[GitHub] [phoenix] comnetwork commented on a change in pull request #444: PHOENIX-5148

comnetwork commented on a change in pull request #444: PHOENIX-5148
URL: https://github.com/apache/phoenix/pull/444#discussion_r265397225
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/compile/QueryPlan.java
 ##########
 @@ -92,4 +94,17 @@
     public boolean useRoundRobinIterator() throws SQLException;
 
     <T> T accept(QueryPlanVisitor<T> visitor);
+
+    /**
+     * <pre>
+     * Get the actual OrderBys of this queryPlan, which may be different from {@link #getOrderBy()},
+     * because {@link #getOrderBy()} is only the compiled result of {@link SelectStatement}.
+     * The return type is List because we can get multiple OrderBys for the query result of {@link SortMergeJoinPlan},
+     * eg. for the sql:
+     * SELECT  * FROM T1 JOIN T2 ON T1.a = T2.a and T1.b = T2.b
+     * The result of the sort-merge-join is sorted on (T1.a, T1.b) and (T2.a, T2.b) at the same time.
+     * </pre>
+     * @return
+     */
+    public List<OrderBy> getActualOutputOrderBys() ;
 
 Review comment:
   Yes,now there would only be multiple OrderBys for SortMergeJoin.
   
   Yes,I think the name `getFinalOrderBy` is OK , I named it as 'getActualOutputOrderBys' because
   the equivalent name in Spark SQL's SparkPlan is `outputOrdering`, FYI.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services