[jira] [Updated] (PHOENIX-5327) PherfMainIT fails with duplicate TABLE/INDEX.

2019-07-11 Thread Viraj Jasani (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Viraj Jasani updated PHOENIX-5327:
--
Attachment: PHOENIX-5327-4.x-HBase-1.5.patch
PHOENIX-5327-4.x-HBase-1.4.patch
PHOENIX-5327-4.x-HBase-1.3.patch

> PherfMainIT fails with duplicate TABLE/INDEX.
> -
>
> Key: PHOENIX-5327
> URL: https://issues.apache.org/jira/browse/PHOENIX-5327
> Project: Phoenix
>  Issue Type: Test
>Affects Versions: 4.15.0, 5.1.0
>Reporter: Lars Hofhansl
>Assignee: Viraj Jasani
>Priority: Major
> Fix For: 4.15.1, 5.1.1
>
> Attachments: PHOENIX-5327-4.x-HBase-1.3.patch, 
> PHOENIX-5327-4.x-HBase-1.4.patch, PHOENIX-5327-4.x-HBase-1.5.patch, 
> PHOENIX-5327.01.patch, PHOENIX-5327.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:java}
> INFO] Running org.apache.phoenix.pherf.PherfMainIT
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
> 54.221 s <<< FAILURE! - in org.apache.phoenix.pherf.PherfMainIT
> [ERROR] testPherfMain(org.apache.phoenix.pherf.PherfMainIT) Time elapsed: 
> 10.455 s <<< ERROR!
> java.util.concurrent.ExecutionException: 
> org.apache.phoenix.schema.TableAlreadyExistsException: ERROR 1013 (42M04): 
> Table already exists. tableName=PHERF.IDX_DIVISION
>  at org.apache.phoenix.pherf.PherfMainIT.testPherfMain(PherfMainIT.java:42)
> Caused by: org.apache.phoenix.schema.TableAlreadyExistsException: ERROR 1013 
> (42M04): Table already exists. tableName=PHERF.IDX_DIVISION
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


Spark sql query the hive external table mapped from phoenix always throw out Class org.apache.phoenix.hive.PhoenixSerDe not found exception

2019-07-11 Thread 马士成

Hello All,

In Apache Phoenix homepage,  It shows two additional functions: Apache Spark 
Integration and Phoenix Storage Handler for Apache Hive,
According the guidance, I can query phoenix table from beeline-cli, I can load 
phoenix table as dataframe using Spark-sql.
So my question is :

Does Phoenix support spark-sql query the hive external table mapped from 
Phoenix ?

I am working on hdp3.0 ( Phoenix 5.0 Hbase 2.0, Hive 3.1.0 ,Spark2.3.1  )  and 
facing the issue as subject mentioned.
I tried to solve this problem but failed, I found some similar questions on 
internet but the answers didn’t work for me.

My submit command :

  spark-submit test3.py --jars \
  /usr/hdp/current/phoenix-client/lib/phoenix-hive-5.0.0.3.0.0.0-1634.jar\
  ,/usr/hdp/current/phoenix-client/lib/hadoop-mapreduce-client-core.jar\
  ,/usr/hdp/current/phoenix-client/lib/phoenix-core-5.0.0.3.0.0.0-1634.jar\
  ,/usr/hdp/current/phoenix-client/lib/phoenix-spark-5.0.0.3.0.0.0-1634.jar\
  ,/usr/hdp/current/hive-client/lib/hive-metastore-3.1.0.3.0.0.0-1634.jar\
  ,/usr/hdp/current/hive-client/lib/hive-common-3.1.0.3.0.0.0-1634.jar\
  ,/usr/hdp/current/hive-client/lib/hbase-client-2.0.0.3.0.0.0-1634.jar\
  ,/usr/hdp/current/hive-client/lib/hbase-mapreduce-2.0.0.3.0.0.0-1634.jar\
  ,/usr/hdp/current/hive-client/lib/hive-serde-3.1.0.3.0.0.0-1634.jar\
  ,/usr/hdp/current/hive-client/lib/hive-shims-3.1.0.3.0.0.0-1634.jar

Log attached and Demo code as below:

  from pyspark.sql import SparkSession
  if __name__ == '__main__':
  spark = SparkSession.builder \
  .appName("test") \
  .enableHiveSupport() \
  .getOrCreate()
  df= spark.sql("select count(*) from ajmide_dw.part_device")
  df.show()


Similar Issues:
https://community.hortonworks.com/questions/140097/facing-issue-from-spark-sql.html
https://stackoverflow.com/questions/51501044/unable-to-access-hive-external-tables-from-spark-shell

Any comment or suggestion is appreciated!

Thanks,
Shi-Cheng, Ma


[jira] [Updated] (PHOENIX-5327) PherfMainIT fails with duplicate TABLE/INDEX.

2019-07-11 Thread Mihir Monani (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mihir Monani updated PHOENIX-5327:
--
Attachment: PHOENIX-5327-4.x-HBase-1.4.patch

> PherfMainIT fails with duplicate TABLE/INDEX.
> -
>
> Key: PHOENIX-5327
> URL: https://issues.apache.org/jira/browse/PHOENIX-5327
> Project: Phoenix
>  Issue Type: Test
>Affects Versions: 4.15.0, 5.1.0
>Reporter: Lars Hofhansl
>Assignee: Viraj Jasani
>Priority: Major
> Fix For: 4.15.1, 5.1.1
>
> Attachments: PHOENIX-5327-4.x-HBase-1.3.patch, 
> PHOENIX-5327-4.x-HBase-1.4.patch, PHOENIX-5327-4.x-HBase-1.4.patch, 
> PHOENIX-5327-4.x-HBase-1.5.patch, PHOENIX-5327.01.patch, PHOENIX-5327.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:java}
> INFO] Running org.apache.phoenix.pherf.PherfMainIT
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
> 54.221 s <<< FAILURE! - in org.apache.phoenix.pherf.PherfMainIT
> [ERROR] testPherfMain(org.apache.phoenix.pherf.PherfMainIT) Time elapsed: 
> 10.455 s <<< ERROR!
> java.util.concurrent.ExecutionException: 
> org.apache.phoenix.schema.TableAlreadyExistsException: ERROR 1013 (42M04): 
> Table already exists. tableName=PHERF.IDX_DIVISION
>  at org.apache.phoenix.pherf.PherfMainIT.testPherfMain(PherfMainIT.java:42)
> Caused by: org.apache.phoenix.schema.TableAlreadyExistsException: ERROR 1013 
> (42M04): Table already exists. tableName=PHERF.IDX_DIVISION
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


Re: Spark sql query the hive external table mapped from phoenix always throw out Class org.apache.phoenix.hive.PhoenixSerDe not found exception

2019-07-11 Thread Josh Elser
(Moving this over to the user list as that's the appropriate list for 
this question)


Do you get an error? We can't help you with only a "it didn't work" :)

I'd suggest that you try to narrow down the scope of the problem: is it 
unique to Hive external tables? Can you use a different Hive 
StorageHandler successfully (e.g. the HBaseStorageHandler)?


Finally, as you're using HDP, please also consider using their customer 
support.


On 7/11/19 2:18 AM, 马士成 wrote:

Hello All,

In Apache Phoenix homepage,  It shows two additional functions: Apache 
Spark Integration and Phoenix Storage Handler for Apache Hive,


According the guidance, I can query phoenix table from beeline-cli, I 
can load phoenix table as dataframe using Spark-sql.


So my question is :

Does Phoenix support spark-sql query the hive external table mapped from 
Phoenix ?


I am working on hdp3.0 ( Phoenix 5.0 Hbase 2.0, Hive 3.1.0 ,Spark2.3.1 
  )  and facing the issue as subject mentioned.


I tried to solve this problem but failed, I found some similar questions 
on internet but the answers didn’t work for me.


My submit command :

   spark-submit test3.py --jars \

   /usr/hdp/current/phoenix-client/lib/phoenix-hive-5.0.0.3.0.0.0-1634.jar\

   ,/usr/hdp/current/phoenix-client/lib/hadoop-mapreduce-client-core.jar\

   ,/usr/hdp/current/phoenix-client/lib/phoenix-core-5.0.0.3.0.0.0-1634.jar\

   
,/usr/hdp/current/phoenix-client/lib/phoenix-spark-5.0.0.3.0.0.0-1634.jar\


   ,/usr/hdp/current/hive-client/lib/hive-metastore-3.1.0.3.0.0.0-1634.jar\

   ,/usr/hdp/current/hive-client/lib/hive-common-3.1.0.3.0.0.0-1634.jar\

   ,/usr/hdp/current/hive-client/lib/hbase-client-2.0.0.3.0.0.0-1634.jar\

   ,/usr/hdp/current/hive-client/lib/hbase-mapreduce-2.0.0.3.0.0.0-1634.jar\

   ,/usr/hdp/current/hive-client/lib/hive-serde-3.1.0.3.0.0.0-1634.jar\

   ,/usr/hdp/current/hive-client/lib/hive-shims-3.1.0.3.0.0.0-1634.jar

Log attached and Demo code as below:

   from pyspark.sql import SparkSession

   if __name__ == '__main__':

   spark = SparkSession.builder \

   .appName("test") \

   .enableHiveSupport() \

   .getOrCreate()

   df= spark.sql("select count(*) from ajmide_dw.part_device")

   df.show()

Similar Issues:

https://community.hortonworks.com/questions/140097/facing-issue-from-spark-sql.html

https://stackoverflow.com/questions/51501044/unable-to-access-hive-external-tables-from-spark-shell

Any comment or suggestion is appreciated!

Thanks,

Shi-Cheng, Ma



[jira] [Updated] (PHOENIX-5290) HashJoinMoreIT is flapping

2019-07-11 Thread Lars Hofhansl (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lars Hofhansl updated PHOENIX-5290:
---
Attachment: 5290-failure.txt

> HashJoinMoreIT is flapping
> --
>
> Key: PHOENIX-5290
> URL: https://issues.apache.org/jira/browse/PHOENIX-5290
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.14.1, 5.1.0
>Reporter: Lars Hofhansl
>Priority: Major
> Attachments: 5290-failure.txt
>
>
> {code}
> [INFO] Running org.apache.phoenix.end2end.join.HashJoinMoreIT
> [ERROR] Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
> 91.509 s <<< FAILURE! - in org.apache.phoenix.end2end.join.HashJoinMoreIT
> [ERROR] testBug2961(org.apache.phoenix.end2end.join.HashJoinMoreIT)  Time 
> elapsed: 2.42 s  <<< ERROR!
> java.lang.IllegalArgumentException: 6 > 5
> at 
> org.apache.phoenix.end2end.join.HashJoinMoreIT.testBug2961(HashJoinMoreIT.java:898)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5290) HashJoinMoreIT is flapping

2019-07-11 Thread Lars Hofhansl (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lars Hofhansl updated PHOENIX-5290:
---
Fix Version/s: 5.1.0
   4.15.0

> HashJoinMoreIT is flapping
> --
>
> Key: PHOENIX-5290
> URL: https://issues.apache.org/jira/browse/PHOENIX-5290
> Project: Phoenix
>  Issue Type: Bug
>Affects Versions: 4.15.0, 4.14.1, 5.1.0
>Reporter: Lars Hofhansl
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: 5290-failure.txt
>
>
> {code}
> [INFO] Running org.apache.phoenix.end2end.join.HashJoinMoreIT
> [ERROR] Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
> 91.509 s <<< FAILURE! - in org.apache.phoenix.end2end.join.HashJoinMoreIT
> [ERROR] testBug2961(org.apache.phoenix.end2end.join.HashJoinMoreIT)  Time 
> elapsed: 2.42 s  <<< ERROR!
> java.lang.IllegalArgumentException: 6 > 5
> at 
> org.apache.phoenix.end2end.join.HashJoinMoreIT.testBug2961(HashJoinMoreIT.java:898)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5382) Perf improvement with bulk operation over iterations

2019-07-11 Thread Chinmay Kulkarni (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chinmay Kulkarni updated PHOENIX-5382:
--
Fix Version/s: (was: 4.15.1)
   5.1.0

> Perf improvement with bulk operation over iterations
> 
>
> Key: PHOENIX-5382
> URL: https://issues.apache.org/jira/browse/PHOENIX-5382
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.15.0, 4.15.1, 4.14.3
>Reporter: Viraj Jasani
>Assignee: Viraj Jasani
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-5382-4.14-HBase-1.3.patch, 
> PHOENIX-5382-4.14-HBase-1.4.patch, PHOENIX-5382-4.x-HBase-1.3.patch, 
> PHOENIX-5382-4.x-HBase-1.4.patch, PHOENIX-5382-4.x-HBase-1.5.patch, 
> PHOENIX-5382.patch
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> At some places, we are using iteration to add all elements of one collection 
> to another one. We can use bulk APIs to improve performance



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5327) PherfMainIT fails with duplicate TABLE/INDEX.

2019-07-11 Thread Mihir Monani (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mihir Monani updated PHOENIX-5327:
--
Attachment: PHOENIX-5327-4.x-HBase-1.3.patch

> PherfMainIT fails with duplicate TABLE/INDEX.
> -
>
> Key: PHOENIX-5327
> URL: https://issues.apache.org/jira/browse/PHOENIX-5327
> Project: Phoenix
>  Issue Type: Test
>Affects Versions: 4.15.0, 5.1.0
>Reporter: Lars Hofhansl
>Assignee: Viraj Jasani
>Priority: Major
> Fix For: 4.15.1, 5.1.1
>
> Attachments: PHOENIX-5327-4.x-HBase-1.3.patch, 
> PHOENIX-5327-4.x-HBase-1.3.patch, PHOENIX-5327-4.x-HBase-1.4.patch, 
> PHOENIX-5327-4.x-HBase-1.4.patch, PHOENIX-5327-4.x-HBase-1.5.patch, 
> PHOENIX-5327.01.patch, PHOENIX-5327.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> {code:java}
> INFO] Running org.apache.phoenix.pherf.PherfMainIT
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
> 54.221 s <<< FAILURE! - in org.apache.phoenix.pherf.PherfMainIT
> [ERROR] testPherfMain(org.apache.phoenix.pherf.PherfMainIT) Time elapsed: 
> 10.455 s <<< ERROR!
> java.util.concurrent.ExecutionException: 
> org.apache.phoenix.schema.TableAlreadyExistsException: ERROR 1013 (42M04): 
> Table already exists. tableName=PHERF.IDX_DIVISION
>  at org.apache.phoenix.pherf.PherfMainIT.testPherfMain(PherfMainIT.java:42)
> Caused by: org.apache.phoenix.schema.TableAlreadyExistsException: ERROR 1013 
> (42M04): Table already exists. tableName=PHERF.IDX_DIVISION
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5228) use slf4j for logging in phoenix project

2019-07-11 Thread Xinyi Yan (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xinyi Yan updated PHOENIX-5228:
---
Attachment: PHOENIX-5228-FIX-4.x-HBase-1.3.patch

> use slf4j for logging in phoenix project
> 
>
> Key: PHOENIX-5228
> URL: https://issues.apache.org/jira/browse/PHOENIX-5228
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.1, 5.1.0
>Reporter: Mihir Monani
>Assignee: Xinyi Yan
>Priority: Trivial
>  Labels: SFDC
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-5228-4.x-HBase-1.3.patch, 
> PHOENIX-5228-4.x-HBase-1.4.patch, PHOENIX-5228-4.x-HBase-1.5.patch, 
> PHOENIX-5228-FIX-4.x-HBase-1.3.patch, PHOENIX-5228-FIX-4.x-HBase-1.4.patch, 
> PHOENIX-5228-FIX-4.x-HBase-1.5.patch, PHOENIX-5228-FIX-master.patch, 
> PHOENIX-5228.patch
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> It would be good to use slf4j for logging in phoenix project. Here is list of 
> files where doesn't use slf4j. 
> phoenix-core :-
> {noformat}
> WALRecoveryRegionPostOpenIT.java
> WALReplayWithIndexWritesAndCompressedWALIT.java
> BasePermissionsIT.java
> ChangePermissionsIT.java
> IndexRebuildIncrementDisableCountIT.java
> InvalidIndexStateClientSideIT.java
> MutableIndexReplicationIT.java
> FailForUnsupportedHBaseVersionsIT.java
> SecureUserConnectionsIT.java
> PhoenixMetricsIT.java
> BaseTracingTestIT.java
> PhoenixTracingEndToEndIT.java
> PhoenixRpcSchedulerFactory.java
> IndexHalfStoreFileReaderGenerator.java
> BinaryCompatibleBaseDecoder.java
> ServerCacheClient.java
> CallRunner.java
> MetaDataRegionObserver.java
> PhoenixAccessController.java
> ScanRegionObserver.java
> TaskRegionObserver.java
> DropChildViewsTask.java
> IndexRebuildTask.java
> BaseQueryPlan.java
> HashJoinPlan.java
> CollationKeyFunction.java
> Indexer.java
> LockManager.java
> BaseIndexBuilder.java
> IndexBuildManager.java
> NonTxIndexBuilder.java
> IndexMemStore.java
> BaseTaskRunner.java
> QuickFailingTaskRunner.java
> TaskBatch.java
> ThreadPoolBuilder.java
> ThreadPoolManager.java
> IndexManagementUtil.java
> IndexWriter.java
> IndexWriterUtils.java
> KillServerOnFailurePolicy.java
> ParallelWriterIndexCommitter.java
> RecoveryIndexWriter.java
> TrackingParallelWriterIndexCommitter.java
> PhoenixIndexFailurePolicy.java
> PhoenixTransactionalIndexer.java
> SnapshotScanner.java
> PhoenixEmbeddedDriver.java
> PhoenixResultSet.java
> QueryLogger.java
> QueryLoggerDisruptor.java
> TableLogWriter.java
> PhoenixInputFormat.java
> PhoenixOutputFormat.java
> PhoenixRecordReader.java
> PhoenixRecordWriter.java
> PhoenixServerBuildIndexInputFormat.java
> PhoenixMRJobSubmitter.java
> PhoenixConfigurationUtil.java
> Metrics.java
> DefaultStatisticsCollector.java
> StatisticsScanner.java
> PhoenixMetricsSink.java
> TraceReader.java
> TraceSpanReceiver.java
> TraceWriter.java
> Tracing.java
> EquiDepthStreamHistogram.java
> PhoenixMRJobUtil.java
> QueryUtil.java
> ServerUtil.java
> ZKBasedMasterElectionUtil.java
> IndexTestingUtils.java
> StubAbortable.java
> TestIndexWriter.java
> TestParalleIndexWriter.java
> TestParalleWriterIndexCommitter.java
> TestWALRecoveryCaching.java
> LoggingSink.java
> ParameterizedPhoenixCanaryToolIT.java
> CoprocessorHConnectionTableFactoryTest.java
> TestUtil.java{noformat}
> phoenix-tracing-webapp :-
> {noformat}
> org/apache/phoenix/tracingwebapp/http/Main.java
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5228) use slf4j for logging in phoenix project

2019-07-11 Thread Xinyi Yan (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xinyi Yan updated PHOENIX-5228:
---
Attachment: (was: PHOENIX-5228-FIX-4.x-HBase-1.3.patch)

> use slf4j for logging in phoenix project
> 
>
> Key: PHOENIX-5228
> URL: https://issues.apache.org/jira/browse/PHOENIX-5228
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.1, 5.1.0
>Reporter: Mihir Monani
>Assignee: Xinyi Yan
>Priority: Trivial
>  Labels: SFDC
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-5228-4.x-HBase-1.3.patch, 
> PHOENIX-5228-4.x-HBase-1.4.patch, PHOENIX-5228-4.x-HBase-1.5.patch, 
> PHOENIX-5228-FIX-4.x-HBase-1.3.patch, PHOENIX-5228-FIX-4.x-HBase-1.4.patch, 
> PHOENIX-5228-FIX-4.x-HBase-1.5.patch, PHOENIX-5228-FIX-master.patch, 
> PHOENIX-5228.patch
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> It would be good to use slf4j for logging in phoenix project. Here is list of 
> files where doesn't use slf4j. 
> phoenix-core :-
> {noformat}
> WALRecoveryRegionPostOpenIT.java
> WALReplayWithIndexWritesAndCompressedWALIT.java
> BasePermissionsIT.java
> ChangePermissionsIT.java
> IndexRebuildIncrementDisableCountIT.java
> InvalidIndexStateClientSideIT.java
> MutableIndexReplicationIT.java
> FailForUnsupportedHBaseVersionsIT.java
> SecureUserConnectionsIT.java
> PhoenixMetricsIT.java
> BaseTracingTestIT.java
> PhoenixTracingEndToEndIT.java
> PhoenixRpcSchedulerFactory.java
> IndexHalfStoreFileReaderGenerator.java
> BinaryCompatibleBaseDecoder.java
> ServerCacheClient.java
> CallRunner.java
> MetaDataRegionObserver.java
> PhoenixAccessController.java
> ScanRegionObserver.java
> TaskRegionObserver.java
> DropChildViewsTask.java
> IndexRebuildTask.java
> BaseQueryPlan.java
> HashJoinPlan.java
> CollationKeyFunction.java
> Indexer.java
> LockManager.java
> BaseIndexBuilder.java
> IndexBuildManager.java
> NonTxIndexBuilder.java
> IndexMemStore.java
> BaseTaskRunner.java
> QuickFailingTaskRunner.java
> TaskBatch.java
> ThreadPoolBuilder.java
> ThreadPoolManager.java
> IndexManagementUtil.java
> IndexWriter.java
> IndexWriterUtils.java
> KillServerOnFailurePolicy.java
> ParallelWriterIndexCommitter.java
> RecoveryIndexWriter.java
> TrackingParallelWriterIndexCommitter.java
> PhoenixIndexFailurePolicy.java
> PhoenixTransactionalIndexer.java
> SnapshotScanner.java
> PhoenixEmbeddedDriver.java
> PhoenixResultSet.java
> QueryLogger.java
> QueryLoggerDisruptor.java
> TableLogWriter.java
> PhoenixInputFormat.java
> PhoenixOutputFormat.java
> PhoenixRecordReader.java
> PhoenixRecordWriter.java
> PhoenixServerBuildIndexInputFormat.java
> PhoenixMRJobSubmitter.java
> PhoenixConfigurationUtil.java
> Metrics.java
> DefaultStatisticsCollector.java
> StatisticsScanner.java
> PhoenixMetricsSink.java
> TraceReader.java
> TraceSpanReceiver.java
> TraceWriter.java
> Tracing.java
> EquiDepthStreamHistogram.java
> PhoenixMRJobUtil.java
> QueryUtil.java
> ServerUtil.java
> ZKBasedMasterElectionUtil.java
> IndexTestingUtils.java
> StubAbortable.java
> TestIndexWriter.java
> TestParalleIndexWriter.java
> TestParalleWriterIndexCommitter.java
> TestWALRecoveryCaching.java
> LoggingSink.java
> ParameterizedPhoenixCanaryToolIT.java
> CoprocessorHConnectionTableFactoryTest.java
> TestUtil.java{noformat}
> phoenix-tracing-webapp :-
> {noformat}
> org/apache/phoenix/tracingwebapp/http/Main.java
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-4893) Move parent column combining logic of view and view indexes from server to client

2019-07-11 Thread Thomas D'Silva (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-4893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas D'Silva updated PHOENIX-4893:

Attachment: PHOENIX-4893-4.x-HBase-1.3-v1.patch

> Move parent column combining logic of view and view indexes from server to 
> client
> -
>
> Key: PHOENIX-4893
> URL: https://issues.apache.org/jira/browse/PHOENIX-4893
> Project: Phoenix
>  Issue Type: Sub-task
>Reporter: Lars Hofhansl
>Assignee: Thomas D'Silva
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
> Attachments: PHOENIX-4893-4.x-HBase-1.3-v1.patch
>
>
> In a stack trace I see that phoenix.coprocessor.ViewFinder.findRelatedViews() 
> scans SYSCAT. With splittable SYSCAT which now involves regions from other 
> servers.
> We should really push this to the client now.
> Related to HBASE-21166
> [~tdsilva]



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (PHOENIX-5389) Push down PostFilter to sub JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)
chenglei created PHOENIX-5389:
-

 Summary: Push down PostFilter to sub JoinTable for SortMergeJoin 
and NoStarJoin
 Key: PHOENIX-5389
 URL: https://issues.apache.org/jira/browse/PHOENIX-5389
 Project: Phoenix
  Issue Type: Improvement
Affects Versions: 4.14.2
Reporter: chenglei
Assignee: chenglei
 Fix For: 4.15.0, 5.1.0






--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5389) Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Summary: Push down PostFilter to sub-JoinTable for SortMergeJoin and 
NoStarJoin  (was: Push down PostFilter to sub JoinTable for SortMergeJoin and 
NoStarJoin)

> Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5389) Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following table:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

> Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following table:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5389) Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
 where i.supplier_id != 'medi' or s.address = 'hai'
{code}


  was:
Given following table:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}


> Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
>  where i.supplier_id != 'medi' or s.address = 'hai'
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5389) Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where i.supplier_id != 'medi' or s.address = 'hai'
{code}


  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
 where i.supplier_id != 'medi' or s.address = 'hai'
{code}



> Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where i.supplier_id != 'medi' or s.address = 'hai'
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5389) Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Summary: Push down PostFilter to Sub-JoinTable for SortMergeJoin and 
NoStarJoin  (was: Push down PostFilter to sub-JoinTable for SortMergeJoin and 
NoStarJoin)

> Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above sql is decomposed to: 
> {{(supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> ) inner join order_table o on  i.item_id = o.item_id }}.
> The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
> pushed to the first join {{(supplier_table s inner join item_table i on  
> s.supplier_id = i.supplier_id )}}
> because it only references the columns of {{supplier_table}} and 
> {{item_table}}, 
> but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
> != 'medi'}} does not pushed down to SubJoinTable and as the postFilter  
> current version of 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5389) Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above sql is decomposed to: 
{{(supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id ) 
inner join order_table o on  i.item_id = o.item_id }}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table s inner join item_table i on  
s.supplier_id = i.supplier_id )}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to SubJoinTable and as the postFilter  current 
version of 




  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where i.supplier_id != 'medi' or s.address = 'hai'
{code}



> Push down PostFilter to sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above sql is decomposed to: 
> {{(supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> ) inner join order_table o on  i.item_id = o.item_id }}.
> The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
> pushed to the first join {{(supplier_table s inner join item_table i on  
> s.supplier_id = i.supplier_id )}}
> because it only references the columns of {{supplier_table}} and 
> {{item_table}}, 
> but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
> != 'medi'}} does not pushed down to SubJoinTable and as the postFilter  
> current version of 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (PHOENIX-5389) Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above sql is decomposed to: 
{{(supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id ) 
inner join order_table o on  i.item_id = o.item_id }}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table s inner join item_table i on  
s.supplier_id = i.supplier_id )}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join. 




  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above sql is decomposed to: 
{{(supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id ) 
inner join order_table o on  i.item_id = o.item_id }}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table s inner join item_table i on  
s.supplier_id = i.supplier_id )}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to SubJoinTable and as the postFilter  current 
version of 





> Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above sql is decomposed to: 
> {{(supplier_table s inner join item_table i on  s

[jira] [Updated] (PHOENIX-5389) Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above sql is decomposed to: 
{{(supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id ) 
inner join order_table o on  i.item_id = o.item_id}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table s inner join item_table i on  
s.supplier_id = i.supplier_id )}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join. 




  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above sql is decomposed to: 
{{(supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id ) 
inner join order_table o on  i.item_id = o.item_id }}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table s inner join item_table i on  
s.supplier_id = i.supplier_id )}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join. 





> Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above sql is decomposed to: 
> {{(supplier_table s inner join item_ta

[jira] [Updated] (PHOENIX-5389) Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join composited as: 
{{(supplier_table s inner join item_table i  ) inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table  inner join item_table)}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join {{(supplier_table s inner join item_table i  ) 
inner join order_table}}.




  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above sql is decomposed to: 
{{(supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id ) 
inner join order_table o on  i.item_id = o.item_id}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table s inner join item_table i on  
s.supplier_id = i.supplier_id )}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join. 





> Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above join composited as: 
> {{(supplier_table s inner join item_table i  ) inner join order_table}}.

[jira] [Updated] (PHOENIX-5389) Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join is composited as: 
{{(supplier_table s inner join item_table i)  inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table  inner join item_table)}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join {{(supplier_table s inner join item_table i  ) 
inner join order_table}}.




  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join is composited as: 
{{(supplier_table s inner join item_table i  ) inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table  inner join item_table)}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join {{(supplier_table s inner join item_table i  ) 
inner join order_table}}.





> Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above join is composited as: 
> {{(supplier_table s inner join item_table i)  inner join order_table}}.
> The where condition {

[jira] [Updated] (PHOENIX-5389) Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join is composited as: 
{{(supplier_table s inner join item_table i  ) inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table  inner join item_table)}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join {{(supplier_table s inner join item_table i  ) 
inner join order_table}}.




  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join composited as: 
{{(supplier_table s inner join item_table i  ) inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table  inner join item_table)}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join {{(supplier_table s inner join item_table i  ) 
inner join order_table}}.





> Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above join is composited as: 
> {{(supplier_table s inner join item_table i  ) inner join order_table}}.
> The where condition {{

[jira] [Updated] (PHOENIX-5389) Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join is composited as: 
{{(supplier_table s inner join item_table i)  inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}}  could be 
pushed to the first join  {{(supplier_table  inner join item_table)}},because 
it only references the columns of {{supplier_table}} and {{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to SubJoinTable as expected,  and it as the 
postFilter of the whole join {{(supplier_table s inner join item_table i  ) 
inner join order_table}}.




  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join is composited as: 
{{(supplier_table s inner join item_table i)  inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}} could be 
pushed to the first join {{(supplier_table  inner join item_table)}}
because it only references the columns of {{supplier_table}} and 
{{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to Sub-JoinTable as expected and as the 
postFilter of the whole join {{(supplier_table s inner join item_table i  ) 
inner join order_table}}.





> Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above join is composited as: 
> {{(supplier_table s inner join item_table i)  inner join order_table}}.
> The where condit

[jira] [Updated] (PHOENIX-5389) Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin

2019-07-11 Thread chenglei (JIRA)


 [ 
https://issues.apache.org/jira/browse/PHOENIX-5389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

chenglei updated PHOENIX-5389:
--
Description: 
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join is composited as: 
{{(supplier_table s inner join item_table i)  inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}}  could be 
pushed to the first join  {{(supplier_table  inner join item_table)}},because 
it only references the columns of {{supplier_table}} and {{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to SubJoinTable as expected,  and it as the 
postFilter of the whole join {{(supplier_table s inner join item_table i)  
inner join order_table}}.




  was:
Given following tables:
{code:java}
   create table order_table
   (order_id varchar(15) not null primary key, 
customer_id varchar(10), 
item_id varchar(10), 
price integer, 
quantity integer, 
date timestamp)

   create table item_table
   (item_id varchar(10) not null primary key, 
 name varchar, 
 price integer, 
 discount1 integer, 
 discount2 integer, 
 supplier_id varchar(10), 
 description varchar)

   create table supplier_table
(supplier_id varchar(10) not null primary key, 
  name varchar, 
  phone varchar(12), 
  address varchar, 
  loc_id varchar(5))
{code}

for following sql :
{code:java}
select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, s.name 
from 
supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
inner join order_table o on  i.item_id = o.item_id 
where  s.address = 'hai' or i.supplier_id != 'medi'
{code}

for SortMergeJoin,  the above join is composited as: 
{{(supplier_table s inner join item_table i)  inner join order_table}}.
The where condition {{s.address = 'hai' or i.supplier_id != 'medi'}}  could be 
pushed to the first join  {{(supplier_table  inner join item_table)}},because 
it only references the columns of {{supplier_table}} and {{item_table}}, 
but unfortunately, this where condition  {{s.address = 'hai' or i.supplier_id 
!= 'medi'}} does not pushed down to SubJoinTable as expected,  and it as the 
postFilter of the whole join {{(supplier_table s inner join item_table i  ) 
inner join order_table}}.





> Push down PostFilter to Sub-JoinTable for SortMergeJoin and NoStarJoin
> --
>
> Key: PHOENIX-5389
> URL: https://issues.apache.org/jira/browse/PHOENIX-5389
> Project: Phoenix
>  Issue Type: Improvement
>Affects Versions: 4.14.2
>Reporter: chenglei
>Assignee: chenglei
>Priority: Major
> Fix For: 4.15.0, 5.1.0
>
>
> Given following tables:
> {code:java}
>create table order_table
>(order_id varchar(15) not null primary key, 
> customer_id varchar(10), 
> item_id varchar(10), 
> price integer, 
> quantity integer, 
> date timestamp)
>create table item_table
>(item_id varchar(10) not null primary key, 
>  name varchar, 
>  price integer, 
>  discount1 integer, 
>  discount2 integer, 
>  supplier_id varchar(10), 
>  description varchar)
>create table supplier_table
> (supplier_id varchar(10) not null primary key, 
>   name varchar, 
>   phone varchar(12), 
>   address varchar, 
>   loc_id varchar(5))
> {code}
> for following sql :
> {code:java}
> select /*+ USE_SORT_MERGE_JOIN */  o.order_id,i.item_id, s.supplier_id, 
> s.name from 
> supplier_table s inner join item_table i on  s.supplier_id = i.supplier_id 
> inner join order_table o on  i.item_id = o.item_id 
> where  s.address = 'hai' or i.supplier_id != 'medi'
> {code}
> for SortMergeJoin,  the above join is composited as: 
> {{(supplier_table s inner join item_table i)  inner join order_table}}.
> The where c