List of usage examples for com.google.common.collect ImmutableList.Builder indexOf
@Override public int indexOf(@Nullable Object object)
From source file:com.facebook.presto.hive.BenchmarkHiveFileFormats.java
private static List<HiveColumnHandle> getHiveColumnHandles(TpchColumn<?>... tpchColumns) { ImmutableList.Builder<HiveColumnHandle> columns = ImmutableList.builder(); for (TpchColumn<?> column : tpchColumns) { int ordinal = COLUMNS.indexOf(column); ObjectInspector inspector = getObjectInspector(column); HiveType hiveType = HiveType.valueOf(inspector.getTypeName()); columns.add(new HiveColumnHandle("test", column.getColumnName(), hiveType, hiveType.getTypeSignature(), ordinal, false));//from w w w . ja v a 2 s . co m } return columns.build(); }