Apache Phoenix - Timeout crawler - Build https://builds.apache.org/job/Phoenix-master/2455/

2019-07-15 Thread Apache Jenkins Server
[...truncated 50 lines...]

Build failed in Jenkins: Phoenix | Master #2455

2019-07-15 Thread Apache Jenkins Server
See 


Changes:

[chenglei] PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin 
and

--
[...truncated 172.65 KB...]
org.apache.hadoop.hbase.DoNotRetryIOException: SCHEMA2.N23: 
java.lang.OutOfMemoryError: unable to create new native thread
at 
org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:113)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:661)
at 
org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17038)
at 
org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8016)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2409)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2391)
at 
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42010)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)
Caused by: java.lang.RuntimeException: java.lang.OutOfMemoryError: unable to 
create new native thread
at 
org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithoutRetries(RpcRetryingCallerImpl.java:200)
at 
org.apache.hadoop.hbase.client.ClientScanner.call(ClientScanner.java:269)
at 
org.apache.hadoop.hbase.client.ClientScanner.loadCache(ClientScanner.java:437)
at 
org.apache.hadoop.hbase.client.ClientScanner.nextWithSyncCache(ClientScanner.java:312)
at 
org.apache.hadoop.hbase.client.ClientScanner.next(ClientScanner.java:597)
at 
org.apache.phoenix.coprocessor.ViewFinder.findRelatedViews(ViewFinder.java:94)
at 
org.apache.phoenix.coprocessor.ViewFinder.findParentViewofIndex(ViewFinder.java:53)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.findAncestorViewsOfIndex(MetaDataEndpointImpl.java:2570)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.addDerivedColumnsFromAncestors(MetaDataEndpointImpl.java:749)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.combineColumns(MetaDataEndpointImpl.java:685)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTableFromCache(MetaDataEndpointImpl.java:1937)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.doGetTable(MetaDataEndpointImpl.java:3735)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:616)
... 9 more
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:717)
at 
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:957)
at 
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1367)
at 
org.apache.hadoop.hbase.client.ResultBoundedCompletionService.submit(ResultBoundedCompletionService.java:171)
at 
org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.addCallsForCurrentReplica(ScannerCallableWithReplicas.java:320)
at 
org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:182)
at 
org.apache.hadoop.hbase.client.ScannerCallableWithReplicas.call(ScannerCallableWithReplicas.java:58)
at 
org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithoutRetries(RpcRetryingCallerImpl.java:192)
... 21 more

Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException: 
org.apache.hadoop.hbase.DoNotRetryIOException: SCHEMA2.N23: 
java.lang.OutOfMemoryError: unable to create new native thread
at 
org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:113)
at 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:661)
at 
org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:17038)
at 
org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:8016)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:2409)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:2391)
at 
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:42010)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
at 

Build failed in Jenkins: Phoenix-4.x-HBase-1.3 #470

2019-07-15 Thread Apache Jenkins Server
See 


Changes:

[chenglei] PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin 
and

--
[...truncated 113.34 KB...]
[INFO] Running org.apache.phoenix.end2end.QueryLoggerIT
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 64.033 s 
- in org.apache.phoenix.end2end.QueryLoggerIT
[INFO] Running org.apache.phoenix.end2end.QueryWithLimitIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.731 s 
- in org.apache.phoenix.end2end.QueryWithLimitIT
[INFO] Running org.apache.phoenix.end2end.QueryTimeoutIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.18 s 
- in org.apache.phoenix.end2end.QueryTimeoutIT
[INFO] Running org.apache.phoenix.end2end.RebuildIndexConnectionPropsIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.389 s 
- in org.apache.phoenix.end2end.RebuildIndexConnectionPropsIT
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 519.696 
s - in org.apache.phoenix.end2end.PermissionNSDisabledIT
[INFO] Running org.apache.phoenix.end2end.RegexBulkLoadToolIT
[INFO] Running org.apache.phoenix.end2end.RenewLeaseIT
[INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 528.135 
s - in org.apache.phoenix.end2end.PermissionNSEnabledIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 28.619 s 
- in org.apache.phoenix.end2end.RenewLeaseIT
[INFO] Running org.apache.phoenix.end2end.SequencePointInTimeIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.096 s 
- in org.apache.phoenix.end2end.SequencePointInTimeIT
[WARNING] Tests run: 10, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 
88.718 s - in org.apache.phoenix.end2end.RegexBulkLoadToolIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 512.328 
s - in org.apache.phoenix.end2end.PermissionsCacheIT
[INFO] Running org.apache.phoenix.end2end.SpillableGroupByIT
[INFO] Running org.apache.phoenix.end2end.SystemCatalogCreationOnConnectionIT
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 17.738 s 
- in org.apache.phoenix.end2end.SpillableGroupByIT
[INFO] Running org.apache.phoenix.end2end.StatsEnabledSplitSystemCatalogIT
[INFO] Running org.apache.phoenix.end2end.SplitIT
[INFO] Running 
org.apache.phoenix.end2end.SysTableNamespaceMappedStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.SystemCatalogIT
[INFO] Running org.apache.phoenix.end2end.TableSnapshotReadsMapReduceIT
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 47.039 s 
- in org.apache.phoenix.end2end.TableSnapshotReadsMapReduceIT
[INFO] Running org.apache.phoenix.end2end.UpdateCacheAcrossDifferentClientsIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 173.348 
s - in org.apache.phoenix.end2end.SystemCatalogIT
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 140.799 
s - in org.apache.phoenix.end2end.UpdateCacheAcrossDifferentClientsIT
[INFO] Running org.apache.phoenix.end2end.UpgradeIT
[INFO] Tests run: 18, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 363.959 
s - in org.apache.phoenix.end2end.StatsEnabledSplitSystemCatalogIT
[INFO] Running org.apache.phoenix.end2end.UserDefinedFunctionsIT
[WARNING] Tests run: 42, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 
382.028 s - in 
org.apache.phoenix.end2end.SysTableNamespaceMappedStatsCollectorIT
[INFO] Running org.apache.phoenix.end2end.index.GlobalIndexCheckerIT
[INFO] Running org.apache.phoenix.end2end.index.ImmutableIndexIT
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 515.691 
s - in org.apache.phoenix.end2end.SplitIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 240.006 
s - in org.apache.phoenix.end2end.UpgradeIT
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 198.916 
s - in org.apache.phoenix.end2end.UserDefinedFunctionsIT
[INFO] Running 
org.apache.phoenix.end2end.index.IndexRebuildIncrementDisableCountIT
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.578 s 
- in org.apache.phoenix.end2end.index.IndexRebuildIncrementDisableCountIT
[INFO] Running org.apache.phoenix.end2end.index.LocalIndexIT
[INFO] Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 209.211 
s - in org.apache.phoenix.end2end.index.GlobalIndexCheckerIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexExtendedIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexFailureIT
[INFO] Running 
org.apache.phoenix.end2end.index.MutableIndexFailureWithNamespaceIT
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 133.819 
s - in org.apache.phoenix.end2end.index.MutableIndexExtendedIT
[INFO] Running org.apache.phoenix.end2end.index.MutableIndexRebuilderIT
[INFO] Tests run: 1, Failures: 0, Errors: 0, 

Apache-Phoenix | 4.x-HBase-1.3 | Build Successful

2019-07-15 Thread Apache Jenkins Server
4.x-HBase-1.3 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-1.3

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-1.3/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-1.3/lastCompletedBuild/testReport/

Changes
[chenglei] PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Build failed in Jenkins: Phoenix Compile Compatibility with HBase #1059

2019-07-15 Thread Apache Jenkins Server
See 


--
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H25 (ubuntu xenial) in workspace 

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/jenkins5780968118026448181.sh
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 386407
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 6
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 10240
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
core id : 0
core id : 1
core id : 2
core id : 3
core id : 4
core id : 5
physical id : 0
physical id : 1
MemTotal:   98957636 kB
MemFree:19655880 kB
Filesystem  Size  Used Avail Use% Mounted on
udev 48G 0   48G   0% /dev
tmpfs   9.5G  970M  8.5G  11% /run
/dev/sda3   3.6T  479G  3.0T  14% /
tmpfs48G 0   48G   0% /dev/shm
tmpfs   5.0M 0  5.0M   0% /run/lock
tmpfs48G 0   48G   0% /sys/fs/cgroup
/dev/sda2   473M  236M  213M  53% /boot
tmpfs   9.5G  4.0K  9.5G   1% /run/user/910
tmpfs   9.5G 0  9.5G   0% /run/user/1000
/dev/loop11  57M   57M 0 100% /snap/snapcraft/3022
/dev/loop4   57M   57M 0 100% /snap/snapcraft/3059
/dev/loop10  55M   55M 0 100% /snap/lxd/10972
/dev/loop7   89M   89M 0 100% /snap/core/7169
/dev/loop8   89M   89M 0 100% /snap/core/7270
/dev/loop2   55M   55M 0 100% /snap/lxd/11098
apache-maven-2.2.1
apache-maven-3.0.4
apache-maven-3.0.5
apache-maven-3.1.1
apache-maven-3.2.1
apache-maven-3.2.5
apache-maven-3.3.3
apache-maven-3.3.9
apache-maven-3.5.0
apache-maven-3.5.2
apache-maven-3.5.4
apache-maven-3.6.0
latest
latest2
latest3


===
Verifying compile level compatibility with HBase 0.98 with Phoenix 
4.x-HBase-0.98
===

Cloning into 'hbase'...
Switched to a new branch '0.98'
Branch 0.98 set up to track remote branch 0.98 from origin.
[ERROR] Plugin org.codehaus.mojo:findbugs-maven-plugin:2.5.2 or one of its 
dependencies could not be resolved: Failed to read artifact descriptor for 
org.codehaus.mojo:findbugs-maven-plugin:jar:2.5.2: Could not transfer artifact 
org.codehaus.mojo:findbugs-maven-plugin:pom:2.5.2 from/to central 
(https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version 
-> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Build step 'Execute shell' marked build as failure


Jenkins build is back to normal : Phoenix-4.x-HBase-1.5 #80

2019-07-15 Thread Apache Jenkins Server
See 




[phoenix] branch master updated: PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-15 Thread chenglei
This is an automated email from the ASF dual-hosted git repository.

chenglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
 new 8c82572  PHOENIX-5389 Push down PostFilter to Sub-JoinTable for 
SortMergeJoin and NoStarJoin
8c82572 is described below

commit 8c82572fd08d9208aff10c1e666cbdf34e492410
Author: chenglei 
AuthorDate: Mon Jul 15 15:19:21 2019 +0800

PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and 
NoStarJoin
---
 .../org/apache/phoenix/compile/JoinCompiler.java   | 365 +
 .../org/apache/phoenix/compile/QueryCompiler.java  |  24 +-
 .../apache/phoenix/compile/SubqueryRewriter.java   |  53 +--
 .../apache/phoenix/optimize/QueryOptimizer.java|  55 +---
 .../phoenix/parse/AndBooleanParseNodeVisitor.java  |  41 +++
 .../parse/AndRewriterBooleanParseNodeVisitor.java  |  72 
 .../phoenix/compile/JoinQueryCompilerTest.java |  48 +--
 .../apache/phoenix/compile/QueryCompilerTest.java  | 207 
 .../java/org/apache/phoenix/util/TestUtil.java |   8 +-
 9 files changed, 610 insertions(+), 263 deletions(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
index ab9eac4..618b506 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
@@ -23,6 +23,7 @@ import static 
org.apache.phoenix.schema.PTable.QualifierEncodingScheme.NON_ENCOD
 
 import java.sql.SQLException;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -34,6 +35,7 @@ import java.util.Map;
 import java.util.Set;
 
 import com.google.common.collect.ImmutableList;
+
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.exception.SQLExceptionCode;
@@ -46,7 +48,9 @@ import 
org.apache.phoenix.expression.function.MinAggregateFunction;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixStatement;
 import org.apache.phoenix.parse.AliasedNode;
+import org.apache.phoenix.parse.AndBooleanParseNodeVisitor;
 import org.apache.phoenix.parse.AndParseNode;
+import org.apache.phoenix.parse.AndRewriterBooleanParseNodeVisitor;
 import org.apache.phoenix.parse.BindTableNode;
 import org.apache.phoenix.parse.BooleanParseNodeVisitor;
 import org.apache.phoenix.parse.ColumnDef;
@@ -139,7 +143,7 @@ public class JoinCompiler {
 Pair> res = select.getFrom().accept(constructor);
 JoinTable joinTable = res.getSecond() == null ? compiler.new 
JoinTable(res.getFirst()) : compiler.new JoinTable(res.getFirst(), 
res.getSecond());
 if (select.getWhere() != null) {
-joinTable.addFilter(select.getWhere());
+joinTable.pushDownFilter(select.getWhere());
 }
 
 ColumnRefParseNodeVisitor generalRefVisitor = new 
ColumnRefParseNodeVisitor(resolver, statement.getConnection());
@@ -230,47 +234,47 @@ public class JoinCompiler {
 }
 
 public class JoinTable {
-private final Table table;
+private final Table leftTable;
 private final List joinSpecs;
-private final List postFilters;
-private final List tables;
-private final List tableRefs;
+private List postFilters;
+private final List allTables;
+private final List allTableRefs;
 private final boolean allLeftJoin;
 private final boolean isPrefilterAccepted;
 private final List prefilterAcceptedTables;
 
 private JoinTable(Table table) {
-this.table = table;
+this.leftTable = table;
 this.joinSpecs = Collections.emptyList();
-this.postFilters = Collections.emptyList();
-this.tables = Collections.singletonList(table);
-this.tableRefs = 
Collections.singletonList(table.getTableRef());
+this.postFilters = Collections.EMPTY_LIST;
+this.allTables = Collections.singletonList(table);
+this.allTableRefs = 
Collections.singletonList(table.getTableRef());
 this.allLeftJoin = false;
 this.isPrefilterAccepted = true;
 this.prefilterAcceptedTables = Collections.emptyList();
 }
 
 private JoinTable(Table table, List joinSpecs) {
-this.table = table;
+this.leftTable = table;
 this.joinSpecs = joinSpecs;
 this.postFilters = new ArrayList();
-this.tables = new ArrayList();
-this.tableRefs = new ArrayList();
-this.tables.add(table);
+this.allTables = new ArrayList();
+this.allTableRefs = new ArrayList();
+

[phoenix] branch 4.x-HBase-1.5 updated: PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-15 Thread chenglei
This is an automated email from the ASF dual-hosted git repository.

chenglei pushed a commit to branch 4.x-HBase-1.5
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.5 by this push:
 new 6bc1f51  PHOENIX-5389 Push down PostFilter to Sub-JoinTable for 
SortMergeJoin and NoStarJoin
6bc1f51 is described below

commit 6bc1f514f267cfbfcfebd68dcbbef6c85c58013c
Author: chenglei 
AuthorDate: Mon Jul 15 15:17:16 2019 +0800

PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and 
NoStarJoin
---
 .../org/apache/phoenix/compile/JoinCompiler.java   | 365 +
 .../org/apache/phoenix/compile/QueryCompiler.java  |  24 +-
 .../apache/phoenix/compile/SubqueryRewriter.java   |  53 +--
 .../apache/phoenix/optimize/QueryOptimizer.java|  55 +---
 .../phoenix/parse/AndBooleanParseNodeVisitor.java  |  41 +++
 .../parse/AndRewriterBooleanParseNodeVisitor.java  |  72 
 .../phoenix/compile/JoinQueryCompilerTest.java |  48 +--
 .../apache/phoenix/compile/QueryCompilerTest.java  | 207 
 .../java/org/apache/phoenix/util/TestUtil.java |   8 +-
 9 files changed, 610 insertions(+), 263 deletions(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
index 3803201..f932a32 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
@@ -23,6 +23,7 @@ import static 
org.apache.phoenix.schema.PTable.QualifierEncodingScheme.NON_ENCOD
 
 import java.sql.SQLException;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -34,6 +35,7 @@ import java.util.Map;
 import java.util.Set;
 
 import com.google.common.collect.ImmutableList;
+
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.exception.SQLExceptionCode;
@@ -46,7 +48,9 @@ import 
org.apache.phoenix.expression.function.MinAggregateFunction;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixStatement;
 import org.apache.phoenix.parse.AliasedNode;
+import org.apache.phoenix.parse.AndBooleanParseNodeVisitor;
 import org.apache.phoenix.parse.AndParseNode;
+import org.apache.phoenix.parse.AndRewriterBooleanParseNodeVisitor;
 import org.apache.phoenix.parse.BindTableNode;
 import org.apache.phoenix.parse.BooleanParseNodeVisitor;
 import org.apache.phoenix.parse.ColumnDef;
@@ -140,7 +144,7 @@ public class JoinCompiler {
 Pair> res = select.getFrom().accept(constructor);
 JoinTable joinTable = res.getSecond() == null ? compiler.new 
JoinTable(res.getFirst()) : compiler.new JoinTable(res.getFirst(), 
res.getSecond());
 if (select.getWhere() != null) {
-joinTable.addFilter(select.getWhere());
+joinTable.pushDownFilter(select.getWhere());
 }
 
 ColumnRefParseNodeVisitor generalRefVisitor = new 
ColumnRefParseNodeVisitor(resolver, statement.getConnection());
@@ -231,47 +235,47 @@ public class JoinCompiler {
 }
 
 public class JoinTable {
-private final Table table;
+private final Table leftTable;
 private final List joinSpecs;
-private final List postFilters;
-private final List tables;
-private final List tableRefs;
+private List postFilters;
+private final List allTables;
+private final List allTableRefs;
 private final boolean allLeftJoin;
 private final boolean isPrefilterAccepted;
 private final List prefilterAcceptedTables;
 
 private JoinTable(Table table) {
-this.table = table;
+this.leftTable = table;
 this.joinSpecs = Collections.emptyList();
-this.postFilters = Collections.emptyList();
-this.tables = Collections.singletonList(table);
-this.tableRefs = 
Collections.singletonList(table.getTableRef());
+this.postFilters = Collections.EMPTY_LIST;
+this.allTables = Collections.singletonList(table);
+this.allTableRefs = 
Collections.singletonList(table.getTableRef());
 this.allLeftJoin = false;
 this.isPrefilterAccepted = true;
 this.prefilterAcceptedTables = Collections.emptyList();
 }
 
 private JoinTable(Table table, List joinSpecs) {
-this.table = table;
+this.leftTable = table;
 this.joinSpecs = joinSpecs;
 this.postFilters = new ArrayList();
-this.tables = new ArrayList();
-this.tableRefs = new ArrayList();
-this.tables.add(table);
+this.allTables = new ArrayList();
+this.allTableRefs = new ArrayList();
+ 

[phoenix] branch 4.x-HBase-1.3 updated: PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-15 Thread chenglei
This is an automated email from the ASF dual-hosted git repository.

chenglei pushed a commit to branch 4.x-HBase-1.3
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.3 by this push:
 new e22116b  PHOENIX-5389 Push down PostFilter to Sub-JoinTable for 
SortMergeJoin and NoStarJoin
e22116b is described below

commit e22116b5cd2cd3eddac07661ec90c57bf0a1f1e0
Author: chenglei 
AuthorDate: Mon Jul 15 15:12:49 2019 +0800

PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and 
NoStarJoin
---
 .../org/apache/phoenix/compile/JoinCompiler.java   | 365 +
 .../org/apache/phoenix/compile/QueryCompiler.java  |  24 +-
 .../apache/phoenix/compile/SubqueryRewriter.java   |  53 +--
 .../apache/phoenix/optimize/QueryOptimizer.java|  55 +---
 .../phoenix/parse/AndBooleanParseNodeVisitor.java  |  41 +++
 .../parse/AndRewriterBooleanParseNodeVisitor.java  |  72 
 .../phoenix/compile/JoinQueryCompilerTest.java |  48 +--
 .../apache/phoenix/compile/QueryCompilerTest.java  | 207 
 .../java/org/apache/phoenix/util/TestUtil.java |   8 +-
 9 files changed, 610 insertions(+), 263 deletions(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
index 3803201..f932a32 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
@@ -23,6 +23,7 @@ import static 
org.apache.phoenix.schema.PTable.QualifierEncodingScheme.NON_ENCOD
 
 import java.sql.SQLException;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -34,6 +35,7 @@ import java.util.Map;
 import java.util.Set;
 
 import com.google.common.collect.ImmutableList;
+
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.exception.SQLExceptionCode;
@@ -46,7 +48,9 @@ import 
org.apache.phoenix.expression.function.MinAggregateFunction;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixStatement;
 import org.apache.phoenix.parse.AliasedNode;
+import org.apache.phoenix.parse.AndBooleanParseNodeVisitor;
 import org.apache.phoenix.parse.AndParseNode;
+import org.apache.phoenix.parse.AndRewriterBooleanParseNodeVisitor;
 import org.apache.phoenix.parse.BindTableNode;
 import org.apache.phoenix.parse.BooleanParseNodeVisitor;
 import org.apache.phoenix.parse.ColumnDef;
@@ -140,7 +144,7 @@ public class JoinCompiler {
 Pair> res = select.getFrom().accept(constructor);
 JoinTable joinTable = res.getSecond() == null ? compiler.new 
JoinTable(res.getFirst()) : compiler.new JoinTable(res.getFirst(), 
res.getSecond());
 if (select.getWhere() != null) {
-joinTable.addFilter(select.getWhere());
+joinTable.pushDownFilter(select.getWhere());
 }
 
 ColumnRefParseNodeVisitor generalRefVisitor = new 
ColumnRefParseNodeVisitor(resolver, statement.getConnection());
@@ -231,47 +235,47 @@ public class JoinCompiler {
 }
 
 public class JoinTable {
-private final Table table;
+private final Table leftTable;
 private final List joinSpecs;
-private final List postFilters;
-private final List tables;
-private final List tableRefs;
+private List postFilters;
+private final List allTables;
+private final List allTableRefs;
 private final boolean allLeftJoin;
 private final boolean isPrefilterAccepted;
 private final List prefilterAcceptedTables;
 
 private JoinTable(Table table) {
-this.table = table;
+this.leftTable = table;
 this.joinSpecs = Collections.emptyList();
-this.postFilters = Collections.emptyList();
-this.tables = Collections.singletonList(table);
-this.tableRefs = 
Collections.singletonList(table.getTableRef());
+this.postFilters = Collections.EMPTY_LIST;
+this.allTables = Collections.singletonList(table);
+this.allTableRefs = 
Collections.singletonList(table.getTableRef());
 this.allLeftJoin = false;
 this.isPrefilterAccepted = true;
 this.prefilterAcceptedTables = Collections.emptyList();
 }
 
 private JoinTable(Table table, List joinSpecs) {
-this.table = table;
+this.leftTable = table;
 this.joinSpecs = joinSpecs;
 this.postFilters = new ArrayList();
-this.tables = new ArrayList();
-this.tableRefs = new ArrayList();
-this.tables.add(table);
+this.allTables = new ArrayList();
+this.allTableRefs = new ArrayList();
+ 

[phoenix] branch 4.x-HBase-1.4 updated: PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-15 Thread chenglei
This is an automated email from the ASF dual-hosted git repository.

chenglei pushed a commit to branch 4.x-HBase-1.4
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.4 by this push:
 new 327eeb9  PHOENIX-5389 Push down PostFilter to Sub-JoinTable for 
SortMergeJoin and NoStarJoin
327eeb9 is described below

commit 327eeb94b5089b1e10afdc531472866442e0d6c5
Author: chenglei 
AuthorDate: Mon Jul 15 15:10:49 2019 +0800

PHOENIX-5389 Push down PostFilter to Sub-JoinTable for SortMergeJoin and 
NoStarJoin
---
 .../org/apache/phoenix/compile/JoinCompiler.java   | 365 +
 .../org/apache/phoenix/compile/QueryCompiler.java  |  24 +-
 .../apache/phoenix/compile/SubqueryRewriter.java   |  53 +--
 .../apache/phoenix/optimize/QueryOptimizer.java|  55 +---
 .../phoenix/parse/AndBooleanParseNodeVisitor.java  |  41 +++
 .../parse/AndRewriterBooleanParseNodeVisitor.java  |  72 
 .../phoenix/compile/JoinQueryCompilerTest.java |  48 +--
 .../apache/phoenix/compile/QueryCompilerTest.java  | 207 
 .../java/org/apache/phoenix/util/TestUtil.java |   8 +-
 9 files changed, 610 insertions(+), 263 deletions(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
index 3803201..f932a32 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java
@@ -23,6 +23,7 @@ import static 
org.apache.phoenix.schema.PTable.QualifierEncodingScheme.NON_ENCOD
 
 import java.sql.SQLException;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -34,6 +35,7 @@ import java.util.Map;
 import java.util.Set;
 
 import com.google.common.collect.ImmutableList;
+
 import org.apache.hadoop.hbase.client.Scan;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.phoenix.exception.SQLExceptionCode;
@@ -46,7 +48,9 @@ import 
org.apache.phoenix.expression.function.MinAggregateFunction;
 import org.apache.phoenix.jdbc.PhoenixConnection;
 import org.apache.phoenix.jdbc.PhoenixStatement;
 import org.apache.phoenix.parse.AliasedNode;
+import org.apache.phoenix.parse.AndBooleanParseNodeVisitor;
 import org.apache.phoenix.parse.AndParseNode;
+import org.apache.phoenix.parse.AndRewriterBooleanParseNodeVisitor;
 import org.apache.phoenix.parse.BindTableNode;
 import org.apache.phoenix.parse.BooleanParseNodeVisitor;
 import org.apache.phoenix.parse.ColumnDef;
@@ -140,7 +144,7 @@ public class JoinCompiler {
 Pair> res = select.getFrom().accept(constructor);
 JoinTable joinTable = res.getSecond() == null ? compiler.new 
JoinTable(res.getFirst()) : compiler.new JoinTable(res.getFirst(), 
res.getSecond());
 if (select.getWhere() != null) {
-joinTable.addFilter(select.getWhere());
+joinTable.pushDownFilter(select.getWhere());
 }
 
 ColumnRefParseNodeVisitor generalRefVisitor = new 
ColumnRefParseNodeVisitor(resolver, statement.getConnection());
@@ -231,47 +235,47 @@ public class JoinCompiler {
 }
 
 public class JoinTable {
-private final Table table;
+private final Table leftTable;
 private final List joinSpecs;
-private final List postFilters;
-private final List tables;
-private final List tableRefs;
+private List postFilters;
+private final List allTables;
+private final List allTableRefs;
 private final boolean allLeftJoin;
 private final boolean isPrefilterAccepted;
 private final List prefilterAcceptedTables;
 
 private JoinTable(Table table) {
-this.table = table;
+this.leftTable = table;
 this.joinSpecs = Collections.emptyList();
-this.postFilters = Collections.emptyList();
-this.tables = Collections.singletonList(table);
-this.tableRefs = 
Collections.singletonList(table.getTableRef());
+this.postFilters = Collections.EMPTY_LIST;
+this.allTables = Collections.singletonList(table);
+this.allTableRefs = 
Collections.singletonList(table.getTableRef());
 this.allLeftJoin = false;
 this.isPrefilterAccepted = true;
 this.prefilterAcceptedTables = Collections.emptyList();
 }
 
 private JoinTable(Table table, List joinSpecs) {
-this.table = table;
+this.leftTable = table;
 this.joinSpecs = joinSpecs;
 this.postFilters = new ArrayList();
-this.tables = new ArrayList();
-this.tableRefs = new ArrayList();
-this.tables.add(table);
+this.allTables = new ArrayList();
+this.allTableRefs = new ArrayList();
+