Replace comma string with static constant COMMA
@@ -277,6 +277,10 @@ public class HiveMetadata
Optional.empty(),
emptyList());
+ // Comma is not a reserved keyword with or without quote
+ // See https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Keywords,Non-reservedKeywordsandReservedKeywords
+ private static final char COMMA = ',';
+
// 1009 is chosen as a prime number greater than 1000.
// This is because Hive bucket function can result in skewed distribution when bucket number of power of 2
// TODO: Use a regular number once better hash function is used for table write shuffle partitioning.
@@ -546,7 +550,7 @@ public class HiveMetadata
// ORC format specific properties
String orcBloomFilterColumns = table.get().getParameters().get(ORC_BLOOM_FILTER_COLUMNS_KEY);
if (orcBloomFilterColumns != null) {
- properties.put(ORC_BLOOM_FILTER_COLUMNS, Splitter.on(',').trimResults().omitEmptyStrings().splitToList(orcBloomFilterColumns));
+ properties.put(ORC_BLOOM_FILTER_COLUMNS, Splitter.on(COMMA).trimResults().omitEmptyStrings().splitToList(orcBloomFilterColumns));
}
String orcBloomFilterFfp = table.get().getParameters().get(ORC_BLOOM_FILTER_FPP_KEY);
if (orcBloomFilterFfp != null) {
@@ -937,7 +941,7 @@ public class HiveMetadata
// ORC format specific properties
List<String> columns = getOrcBloomFilterColumns(tableMetadata.getProperties());
if (columns != null && !columns.isEmpty()) {
- tableProperties.put(ORC_BLOOM_FILTER_COLUMNS_KEY, Joiner.on(",").join(columns));
+ tableProperties.put(ORC_BLOOM_FILTER_COLUMNS_KEY, Joiner.on(COMMA).join(columns));
tableProperties.put(ORC_BLOOM_FILTER_FPP_KEY, String.valueOf(getOrcBloomFilterFpp(tableMetadata.getProperties())));
}
