phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] comnetwork commented on a change in pull request #444: PHOENIX-5148
Date Thu, 14 Mar 2019 02:06:16 GMT
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

Mime
View raw message