本文整理了Java中org.apache.hadoop.hive.ql.metadata.Table.normalize()
方法的一些代码示例,展示了Table.normalize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.normalize()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.metadata.Table
类名称:Table
方法名:normalize
暂无
代码示例来源:origin: apache/hive
public static void validateColumns(List<FieldSchema> columns, List<FieldSchema> partCols)
throws HiveException {
Set<String> colNames = new HashSet<>();
for (FieldSchema col: columns) {
String colName = normalize(col.getName());
if (colNames.contains(colName)) {
throw new HiveException("Duplicate column name " + colName
+ " in the table definition.");
}
colNames.add(colName);
}
if (partCols != null) {
// there is no overlap between columns and partitioning columns
for (FieldSchema partCol: partCols) {
String colName = normalize(partCol.getName());
if (colNames.contains(colName)) {
throw new HiveException("Partition column name " + colName
+ " conflicts with table columns.");
}
}
}
}
代码示例来源:origin: apache/drill
public static void validateColumns(List<FieldSchema> columns, List<FieldSchema> partCols)
throws HiveException {
List<String> colNames = new ArrayList<String>();
for (FieldSchema partCol: columns) {
String colName = normalize(partCol.getName());
if (colNames.contains(colName)) {
throw new HiveException("Duplicate column name " + colName
+ " in the table definition.");
}
colNames.add(colName);
}
if (partCols != null) {
// there is no overlap between columns and partitioning columns
for (FieldSchema partCol: partCols) {
String colName = normalize(partCol.getName());
if (colNames.contains(colName)) {
throw new HiveException("Partition column name " + colName
+ " conflicts with table columns.");
}
}
}
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
public static void validateColumns(List<FieldSchema> columns, List<FieldSchema> partCols)
throws HiveException {
List<String> colNames = new ArrayList<String>();
for (FieldSchema partCol: columns) {
String colName = normalize(partCol.getName());
if (colNames.contains(colName)) {
throw new HiveException("Duplicate column name " + colName
+ " in the table definition.");
}
colNames.add(colName);
}
if (partCols != null) {
// there is no overlap between columns and partitioning columns
for (FieldSchema partCol: partCols) {
String colName = normalize(partCol.getName());
if (colNames.contains(colName)) {
throw new HiveException("Partition column name " + colName
+ " conflicts with table columns.");
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!