com.alibaba.druid.util.OdpsUtils Maven / Gradle / Ivy
package com.alibaba.druid.util;
import java.util.HashSet;
import java.util.Set;
public class OdpsUtils {
private static Set builtinDataTypes;
public static boolean isBuiltinDataType(String dataType) {
if (dataType == null) {
return false;
}
String table_lower = dataType.toLowerCase();
Set dataTypes = builtinDataTypes;
if (dataTypes == null) {
dataTypes = new HashSet();
loadDataTypes(dataTypes);
builtinDataTypes = dataTypes;
}
return dataTypes.contains(table_lower);
}
public static void loadDataTypes(Set dataTypes) {
Utils.loadFromFile("META-INF/druid/parser/odps/builtin_datatypes", dataTypes);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy