stoty commented on a change in pull request #1265:
URL: https://github.com/apache/phoenix/pull/1265#discussion_r668980318



##########
File path: 
phoenix-core/src/main/java/org/apache/phoenix/mapreduce/AbstractBulkLoadTool.java
##########
@@ -226,6 +228,14 @@ private int loadData(Configuration conf, CommandLine 
cmdLine) throws Exception {
         configureOptions(cmdLine, importColumns, conf);
         String sName = SchemaUtil.normalizeIdentifier(schemaName);
         String tName = SchemaUtil.normalizeIdentifier(tableName);
+
+        // There must be a better solution for this
+
+        String tn = sName == null ? "\"" + tName + "\"" : "\"" + sName + 
"\".\"" + tName + "\"";
+        ResultSet rsempty = conn.createStatement().executeQuery("SELECT * FROM 
" + tn);

Review comment:
       Also I'm sure we already have a utility function somewhere to generate 
the table name from the components.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to