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

ASF GitHub Bot commented on PHOENIX-6986:
-----------------------------------------

kabhishek4 commented on code in PR #1640:
URL: https://github.com/apache/phoenix/pull/1640#discussion_r1266248639


##########
phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java:
##########
@@ -336,10 +336,15 @@ private QueryPlan addPlan(PhoenixStatement statement, 
SelectStatement select, PT
         Map<TableRef, QueryPlan> dataPlans = 
Collections.singletonMap(indexTableRef, dataPlan);
         PTable indexTable = indexTableRef.getTable();
         PIndexState indexState = indexTable.getIndexState();
+        boolean isServerMergeFoeUncoveredIndexEnabled = 
statement.getConnection().

Review Comment:
   Corrected the typo. 
   
   I am reading the value of parameter from statement because my test is 
failing. 
   I see that value of parameter is true in QueryOptimizer.addPlan,
   
   this.services.getProps().getBoolean(
   QueryServices.SERVER_MERGE_FOR_UNCOVERED_INDEX,
   QueryServicesOptions.DEFAULT_SERVER_MERGE_FOR_UNCOVERED_INDEX);
   
   despite setting it to
   
   props.setProperty(QueryServices.SERVER_MERGE_FOR_UNCOVERED_INDEX,
       Boolean.toString(false));
   
   in the test. This is because there is nothing in the overriden values map.
   
   I verified another property USE_REVERSE_SCAN_ATTRIB and it shows the same 
behaviour. 
   I could see appropriate value only when read from the ‘statement’ object.
   
   
   Failed Checks analysis:
   The checkstyle errors are not due to my code.
   I ran ParallelPhoenixConnectionFailureTest.testExecuteQueryChainFailure 
locally and it passed. 
   It’s a flaky test.
   



##########
phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java:
##########
@@ -336,10 +336,15 @@ private QueryPlan addPlan(PhoenixStatement statement, 
SelectStatement select, PT
         Map<TableRef, QueryPlan> dataPlans = 
Collections.singletonMap(indexTableRef, dataPlan);
         PTable indexTable = indexTableRef.getTable();
         PIndexState indexState = indexTable.getIndexState();
+        boolean isServerMergeFoeUncoveredIndexEnabled = 
statement.getConnection().

Review Comment:
   Corrected the typo. 
   
   I am reading the value of parameter from statement because my test is 
failing. 
   I see that value of parameter is true in QueryOptimizer.addPlan,
   
   this.services.getProps().getBoolean(
   QueryServices.SERVER_MERGE_FOR_UNCOVERED_INDEX,
   QueryServicesOptions.DEFAULT_SERVER_MERGE_FOR_UNCOVERED_INDEX);
   
   despite setting it to
   
   props.setProperty(QueryServices.SERVER_MERGE_FOR_UNCOVERED_INDEX,
       Boolean.toString(false));
   
   in the test. This is because there is nothing in the overriden values map.
   
   I verified another property USE_REVERSE_SCAN_ATTRIB and it shows the same 
behaviour. 
   I could see appropriate value only when read from the ‘statement’ object.
   
   
   Failed Checks analysis:
   The checkstyle errors are not due to my code.
   I ran ParallelPhoenixConnectionFailureTest.testExecuteQueryChainFailure 
locally and it passed. 
   It’s a flaky test.
   





> Add property to disable server merges for hinted uncovered indexes
> ------------------------------------------------------------------
>
>                 Key: PHOENIX-6986
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6986
>             Project: Phoenix
>          Issue Type: Improvement
>          Components: core
>            Reporter: Istvan Toth
>            Priority: Major
>
> The new server merge query plan can perform worse than the old skip-join-scan 
> plan.
> Add a property to completely disable it.
> This should help with migrating workloads to the new version, without having 
> to verify if server merge performs well, and having add hints to disable it 
> where needed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to