From c44ec55c7398c6210e501e657555accd8bcea91c Mon Sep 17 00:00:00 2001 From: zixi0825 Date: Tue, 5 Dec 2023 12:42:27 +0800 Subject: [PATCH] Fix unquote output_table in spark config --- .../engine/spark/config/BaseSparkConfigurationBuilder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datavines-engine/datavines-engine-plugins/datavines-engine-spark/datavines-engine-spark-config/src/main/java/io/datavines/engine/spark/config/BaseSparkConfigurationBuilder.java b/datavines-engine/datavines-engine-plugins/datavines-engine-spark/datavines-engine-spark-config/src/main/java/io/datavines/engine/spark/config/BaseSparkConfigurationBuilder.java index 10b708bca..9fe6d8dc7 100644 --- a/datavines-engine/datavines-engine-plugins/datavines-engine-spark/datavines-engine-spark-config/src/main/java/io/datavines/engine/spark/config/BaseSparkConfigurationBuilder.java +++ b/datavines-engine/datavines-engine-plugins/datavines-engine-spark/datavines-engine-spark-config/src/main/java/io/datavines/engine/spark/config/BaseSparkConfigurationBuilder.java @@ -90,7 +90,7 @@ protected List getSourceConfigs() throws DataVinesException { String outputTable = getOutputTable(metricInputParameter.get(DATABASE), metricInputParameter.get(SCHEMA), metricInputParameter.get(TABLE)); String tableAlias = getTableAlias(metricInputParameter.get(DATABASE), metricInputParameter.get(SCHEMA), metricInputParameter.get(TABLE), "1"); - connectorParameterMap.put(OUTPUT_TABLE, outputTable); + connectorParameterMap.put(OUTPUT_TABLE, QuoteIdentifier.quote(outputTable)); connectorParameterMap.put(DRIVER, connectorFactory.getDialect().getDriver()); metricInputParameter.put(TABLE, QuoteIdentifier.quote(outputTable)); @@ -146,7 +146,7 @@ protected List getSourceConfigs() throws DataVinesException { String tableAlias2 = getTableAlias(metricInputParameter.get(DATABASE2), metricInputParameter.get(SCHEMA2), metricInputParameter.get(TABLE2) ,"2"); - connectorParameterMap.put(OUTPUT_TABLE, outputTable); + connectorParameterMap.put(OUTPUT_TABLE, QuoteIdentifier.quote(outputTable)); connectorParameterMap.put(DRIVER, connectorFactory.getDialect().getDriver()); metricInputParameter.put(TABLE2, QuoteIdentifier.quote(outputTable)); metricInputParameter.put(TABLE2_ALIAS, QuoteIdentifier.quote(tableAlias2)); @@ -248,6 +248,6 @@ public String getTableAlias(String database, String schema, String table, String table = database + "_" + table; } - return table+ "_" + order; + return table + "_" + order; } }