[GitHub] [phoenix-connectors] brfrn169 commented on issue #11: PHOENIX-5619 CREATE TABLE AS SELECT for Phoenix table doesn't work co…

2020-01-14 Thread GitBox
brfrn169 commented on issue #11: PHOENIX-5619 CREATE TABLE AS SELECT for 
Phoenix table doesn't work co…
URL: https://github.com/apache/phoenix-connectors/pull/11#issuecomment-574431615
 
 
   Thank you @joshelser . I'm stuck and can't get a test showing the issue 
actually. Please commit this if you are okay with the patch. I tested it 
locally and it resolved the issue.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [phoenix-connectors] brfrn169 commented on issue #11: PHOENIX-5619 CREATE TABLE AS SELECT for Phoenix table doesn't work co…

2020-01-14 Thread GitBox
brfrn169 commented on issue #11: PHOENIX-5619 CREATE TABLE AS SELECT for 
Phoenix table doesn't work co…
URL: https://github.com/apache/phoenix-connectors/pull/11#issuecomment-574215946
 
 
   I tried to add an integration test for this but I couldn't reproduce the 
issue by using `HiveTestUtil` for some reason.
   
   So, let me explain the details of the issue here.
   
   I added the code to populate from the table properties into config in 
`PhoenixSerializer` because these values are used in the initialization of 
`PhoenixResultWritable` if the table is transactional here:
   
https://github.com/brfrn169/phoenix-connectors/blob/PHOENIX-5619/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixResultWritable.java#L208-L209
   
   And, in `PhoenixUtil.getPrimaryKeyColumnList()`, a connection object is 
created with empty properties: 
   
https://github.com/brfrn169/phoenix-connectors/blob/PHOENIX-5619/phoenix-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixUtil.java#L112
   
   Because `PhoenixConnectionUtil.getInputConnection()` needs 
`ZOOKEEPER_QUORUM`, `ZOOKEEPER_PORT` and `ZOOKEEPER_PARENT`, we need the code I 
added in `PhoenixSerializer`:
   
https://github.com/brfrn169/phoenix-connectors/blob/PHOENIX-5619/phoenix-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixConnectionUtil.java#L45-L65


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services