From 2d5643cb0a3b824fe920a4f942be30b5d0450512 Mon Sep 17 00:00:00 2001 From: LSmyrnaios Date: Fri, 7 Jul 2023 20:51:14 +0300 Subject: [PATCH] Fix missing spaces in some secondary "DROP"-queries. --- src/main/java/eu/openaire/urls_controller/util/FileUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/openaire/urls_controller/util/FileUtils.java b/src/main/java/eu/openaire/urls_controller/util/FileUtils.java index 8ca85c6..6f2abff 100644 --- a/src/main/java/eu/openaire/urls_controller/util/FileUtils.java +++ b/src/main/java/eu/openaire/urls_controller/util/FileUtils.java @@ -105,7 +105,7 @@ public class FileUtils { errorMsg = "Problem when copying the contents of \"" + tableName + "\" table to a newly created \"" + tableName + "_tmp\" table, when merging the parquet-files!\n"; logger.error(errorMsg, e); try { // Make sure we delete the possibly half-created temp-table. - jdbcTemplate.execute("DROP TABLE IF EXISTS" + ImpalaConnector.databaseName + "." + tableName + "_tmp PURGE"); + jdbcTemplate.execute("DROP TABLE IF EXISTS " + ImpalaConnector.databaseName + "." + tableName + "_tmp PURGE"); // We cannot move on with merging, but no harm happened, since the "table_tmp" name is still reserved for future use (after it was dropped immediately).. } catch (Exception e1) { logger.error("Failed to drop the \"" + tableName + "_tmp\" table!", e1); @@ -122,7 +122,7 @@ public class FileUtils { logger.error(errorMsg, e); // The original table could not be dropped, so the temp-table cannot be renamed to the original..! try { // Make sure we delete the already created temp-table, in order to be able to use it in the future. The merging has failed nevertheless. - jdbcTemplate.execute("DROP TABLE" + ImpalaConnector.databaseName + "." + tableName + "_tmp PURGE"); + jdbcTemplate.execute("DROP TABLE " + ImpalaConnector.databaseName + "." + tableName + "_tmp PURGE"); } catch (Exception e1) { logger.error((errorMsg += "Failed to drop the \"" + tableName + "_tmp\" table!"), e1); // Add this error to the original, both are very important. }