brfrn169 commented on a change in pull request #11: PHOENIX-5619 CREATE TABLE 
AS SELECT for Phoenix table doesn't work co…
URL: https://github.com/apache/phoenix-connectors/pull/11#discussion_r365581916
 
 

 ##########
 File path: 
phoenix-hive/src/main/java/org/apache/phoenix/hive/PhoenixSerializer.java
 ##########
 @@ -64,12 +64,40 @@
 
     public PhoenixSerializer(Configuration config, Properties tbl) throws 
SerDeException {
         String mapping = 
tbl.getProperty(PhoenixStorageHandlerConstants.PHOENIX_COLUMN_MAPPING, null);
-        if(mapping!=null ) {
+        if(mapping != null) {
             config.set(PhoenixStorageHandlerConstants.PHOENIX_COLUMN_MAPPING, 
mapping);
         }
+
+        String tableName = 
tbl.getProperty(PhoenixStorageHandlerConstants.PHOENIX_TABLE_NAME);
+        config.set(PhoenixStorageHandlerConstants.PHOENIX_TABLE_NAME, 
tableName);
+
+        config.set(PhoenixStorageHandlerConstants.PHOENIX_ROWKEYS,
+          tbl.getProperty(PhoenixStorageHandlerConstants.PHOENIX_ROWKEYS));
+
+        String quorum = 
config.get(PhoenixStorageHandlerConstants.ZOOKEEPER_QUORUM);
+        if (quorum == null) {
 
 Review comment:
   Thank you for this comment. It looks like `quorum` from `config` can be 
null. In this case, the quorum value from table property `tbl` will be used.
   
   The same logic here:
   
https://github.com/apache/phoenix-connectors/blob/0d50ca517c41071413743dafed519d96b58baf69/phoenix-hive/src/main/java/org/apache/phoenix/hive/util/PhoenixConnectionUtil.java#L47-L61

----------------------------------------------------------------
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

Reply via email to