@Test public void testQuoteIdentifier() { String guess = JdbcHiveInputBase.quoteIdentifier("Tbl1.Col1", SourceDialect.MYSQL); assertEquals("`Tbl1`.`Col1`", guess); guess = JdbcHiveInputBase.quoteIdentifier("Tbl1.Col1", SourceDialect.MSSQL); assertEquals("[Tbl1].[Col1]", guess); }
static String quoteIdentifier(String identifier, SourceDialect dialect) { if (KylinConfig.getInstanceFromEnv().enableHiveDdlQuote()) { String[] identifierArray = identifier.split("\\."); String quoted = ""; for (int i = 0; i < identifierArray.length; i++) { identifierArray[i] = FlatTableSqlQuoteUtils.quoteIdentifier(dialect, identifierArray[i]); } quoted = String.join(".", identifierArray); return quoted; } else { return identifier; } }
JdbcHiveInputBase extends HiveInputBase { static String quoteIdentifier(String identifier, SourceDialect dialect) { if (KylinConfig.getInstanceFromEnv().enableHiveDdlQuote()) { String[] identifierArray = identifier.split("\\."); String quoted = ""; for (int i = 0; i < identifierArray.length; i++) { identifierArray[i] = FlatTableSqlQuoteUtils.quoteIdentifier(dialect, identifierArray[i]); } quoted = String.join(".", identifierArray); return quoted; } else { return identifier; } } }
JdbcHiveInputBase extends HiveInputBase { static String quoteIdentifier(String identifier, SourceDialect dialect) { if (KylinConfig.getInstanceFromEnv().enableHiveDdlQuote()) { String[] identifierArray = identifier.split("\\."); String quoted = ""; for (int i = 0; i < identifierArray.length; i++) { identifierArray[i] = FlatTableSqlQuoteUtils.quoteIdentifier(dialect, identifierArray[i]); } quoted = String.join(".", identifierArray); return quoted; } else { return identifier; } }  }
JdbcHiveInputBase extends HiveInputBase { static String quoteIdentifier(String identifier, SourceDialect dialect) { if (KylinConfig.getInstanceFromEnv().enableHiveDdlQuote()) { String[] identifierArray = identifier.split("\\."); String quoted = ""; for (int i = 0; i < identifierArray.length; i++) { identifierArray[i] = FlatTableSqlQuoteUtils.quoteIdentifier(dialect, identifierArray[i]); } quoted = String.join(".", identifierArray); return quoted; } else { return identifier; } }   }
JdbcHiveInputBase extends HiveInputBase { static String quoteIdentifier(String identifier, SourceDialect dialect) { if (KylinConfig.getInstanceFromEnv().enableHiveDdlQuote()) { String[] identifierArray = identifier.split("\\."); String quoted = ""; for (int i = 0; i < identifierArray.length; i++) { identifierArray[i] = FlatTableSqlQuoteUtils.quoteIdentifier(dialect, identifierArray[i]); } quoted = String.join(".", identifierArray); return quoted; } else { return identifier; } }    }