parquet.schema.MessageType.getFieldIndex()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中parquet.schema.MessageType.getFieldIndex()方法的一些代码示例,展示了MessageType.getFieldIndex()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MessageType.getFieldIndex()方法的具体详情如下:
包路径:parquet.schema.MessageType
类名称:MessageType
方法名:getFieldIndex

MessageType.getFieldIndex介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

public static int getFieldIndex(MessageType fileSchema, String name)
{
  try {
    return fileSchema.getFieldIndex(name.toLowerCase(Locale.ENGLISH));
  }
  catch (InvalidRecordException e) {
    for (parquet.schema.Type type : fileSchema.getFields()) {
      if (type.getName().equalsIgnoreCase(name)) {
        return fileSchema.getFieldIndex(type.getName());
      }
    }
    return -1;
  }
}

代码示例来源:origin: asakusafw/asakusafw

mapping.target.getTypeInfo()));
int index = schema.getFieldIndex(mapping.source.getPath()[0]);
propertyMap.put(index, mapping);

代码示例来源:origin: dbiir/rainbow

int fieldIndex = schema.getFieldIndex(columnName.toLowerCase());
ColumnDescriptor descriptor = schema.getColumns().get(fieldIndex);

代码示例来源:origin: uk.co.nichesolutions.presto/presto-hive

int fieldIndex = requestedSchema.getFieldIndex(columnNames.get(fieldId));
ColumnDescriptor columnDescriptor = requestedSchema.getColumns().get(fieldIndex);
blocks[fieldId] = new LazyBlock(batchSize, new ParquetBlockLoader(columnDescriptor, type));

相关文章