org.apache.hadoop.hive.ql.metadata.Table.normalize()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(236)

本文整理了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

Table.normalize介绍

暂无

代码示例

代码示例来源:origin: apache/hive

  1. public static void validateColumns(List<FieldSchema> columns, List<FieldSchema> partCols)
  2. throws HiveException {
  3. Set<String> colNames = new HashSet<>();
  4. for (FieldSchema col: columns) {
  5. String colName = normalize(col.getName());
  6. if (colNames.contains(colName)) {
  7. throw new HiveException("Duplicate column name " + colName
  8. + " in the table definition.");
  9. }
  10. colNames.add(colName);
  11. }
  12. if (partCols != null) {
  13. // there is no overlap between columns and partitioning columns
  14. for (FieldSchema partCol: partCols) {
  15. String colName = normalize(partCol.getName());
  16. if (colNames.contains(colName)) {
  17. throw new HiveException("Partition column name " + colName
  18. + " conflicts with table columns.");
  19. }
  20. }
  21. }
  22. }

代码示例来源:origin: apache/drill

  1. public static void validateColumns(List<FieldSchema> columns, List<FieldSchema> partCols)
  2. throws HiveException {
  3. List<String> colNames = new ArrayList<String>();
  4. for (FieldSchema partCol: columns) {
  5. String colName = normalize(partCol.getName());
  6. if (colNames.contains(colName)) {
  7. throw new HiveException("Duplicate column name " + colName
  8. + " in the table definition.");
  9. }
  10. colNames.add(colName);
  11. }
  12. if (partCols != null) {
  13. // there is no overlap between columns and partitioning columns
  14. for (FieldSchema partCol: partCols) {
  15. String colName = normalize(partCol.getName());
  16. if (colNames.contains(colName)) {
  17. throw new HiveException("Partition column name " + colName
  18. + " conflicts with table columns.");
  19. }
  20. }
  21. }
  22. }

代码示例来源:origin: com.facebook.presto.hive/hive-apache

  1. public static void validateColumns(List<FieldSchema> columns, List<FieldSchema> partCols)
  2. throws HiveException {
  3. List<String> colNames = new ArrayList<String>();
  4. for (FieldSchema partCol: columns) {
  5. String colName = normalize(partCol.getName());
  6. if (colNames.contains(colName)) {
  7. throw new HiveException("Duplicate column name " + colName
  8. + " in the table definition.");
  9. }
  10. colNames.add(colName);
  11. }
  12. if (partCols != null) {
  13. // there is no overlap between columns and partitioning columns
  14. for (FieldSchema partCol: partCols) {
  15. String colName = normalize(partCol.getName());
  16. if (colNames.contains(colName)) {
  17. throw new HiveException("Partition column name " + colName
  18. + " conflicts with table columns.");
  19. }
  20. }
  21. }
  22. }

相关文章

Table类方法