You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2018/03/05 23:26:00 UTC

[jira] [Commented] (PHOENIX-4616) Move join query optimization out from QueryCompiler into QueryOptimizer

    [ https://issues.apache.org/jira/browse/PHOENIX-4616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16386947#comment-16386947 ] 

James Taylor commented on PHOENIX-4616:
---------------------------------------

Thanks for the patch, [~maryannxue]. Looks really good - a nice improvement. A few questions:
- Why is this change required?
{code}
*--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/join/BaseJoinIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/join/BaseJoinIT.java
@@ -34,6 +34,7 @@ import java.util.regex.Pattern;
 
 import org.apache.phoenix.cache.ServerCacheClient;
 import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
+import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.SchemaUtil;
 import org.apache.phoenix.util.StringUtil;
@@ -456,6 +457,7 @@ public abstract class BaseJoinIT extends ParallelStatsDisabledIT {
 	protected Connection getConnection() throws SQLException {
 		Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 		props.put(ServerCacheClient.HASH_JOIN_SERVER_CACHE_RESEND_PER_SERVER, "true");
+        props.put(QueryServices.FORCE_ROW_KEY_ORDER_ATTRIB, "true");
 		return DriverManager.getConnection(getUrl(), props);
 	}
{code}
- Minor nit, how about naming this class something like GenSubqueryParamValuesRewriter?
{code}
+public class SubqueryDummyValueRewriter extends ParseNodeRewriter {
{code}
- Do all the unit tests pass?

> Move join query optimization out from QueryCompiler into QueryOptimizer
> -----------------------------------------------------------------------
>
>                 Key: PHOENIX-4616
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4616
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Maryann Xue
>            Assignee: Maryann Xue
>            Priority: Major
>         Attachments: PHOENIX-4616.patch
>
>
> Currently we do optimization for join queries inside QueryCompiler, which makes the APIs and code logic confusing, so we need to move join optimization logic into QueryOptimizer.
>  Similarly, but probably with a different approach, we need to optimize UNION ALL queries and derived table sub-queries in QueryOptimizer.optimize().
> Please also refer to this comment:
> https://issues.apache.org/jira/browse/PHOENIX-4585?focusedCommentId=16367616&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16367616



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)