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: [email protected] With regards, Apache Git Services
