You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/07/13 16:00:11 UTC

[GitHub] [phoenix] stoty commented on a change in pull request #1265: PHOENIX-6405 Disallow bulk loading into non-empty tables with global …

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



##########
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:
       Add limit 1 to hopefully reduce the load.




-- 
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: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org