public TableSchema(TTableSchema tTableSchema) { for (TColumnDesc tColumnDesc : tTableSchema.getColumns()) { columns.add(new ColumnDescriptor(tColumnDesc)); } }
public static ColumnDescriptor newPrimitiveColumnDescriptor(String name, String comment, Type type, int position) { // Current usage looks like it's only for metadata columns, but if that changes then // this method may need to require a type qualifiers aruments. return new ColumnDescriptor(name, comment, new TypeDescriptor(type), position); }
public TableSchema(List<FieldSchema> fieldSchemas) { int pos = 1; for (FieldSchema field : fieldSchemas) { columns.add(new ColumnDescriptor(field.getName(), field.getComment(), new TypeDescriptor( field.getType()), pos++)); } }
public TableSchema(List<FieldSchema> fieldSchemas) { int pos = 1; for (FieldSchema field : fieldSchemas) { columns.add(new ColumnDescriptor(field, pos++)); } }
public TableSchema(List<FieldSchema> fieldSchemas) { int pos = 1; for (FieldSchema field : fieldSchemas) { columns.add(new ColumnDescriptor(field, pos++)); } }
public TableSchema(List<FieldSchema> fieldSchemas) { int pos = 1; for (FieldSchema field : fieldSchemas) { columns.add(new ColumnDescriptor(field, pos++)); } }
public TableSchema(TTableSchema tTableSchema) { for (TColumnDesc tColumnDesc : tTableSchema.getColumns()) { columns.add(new ColumnDescriptor(tColumnDesc)); } }
public TableSchema(TTableSchema tTableSchema) { for (TColumnDesc tColumnDesc : tTableSchema.getColumns()) { columns.add(new ColumnDescriptor(tColumnDesc)); } }
public TableSchema(TTableSchema tTableSchema) { for (TColumnDesc tColumnDesc : tTableSchema.getColumns()) { columns.add(new ColumnDescriptor(tColumnDesc)); } }
public TableSchema(TTableSchema tTableSchema) { for (TColumnDesc tColumnDesc : tTableSchema.getColumns()) { columns.add(new ColumnDescriptor(tColumnDesc)); } }
public TableSchema(TTableSchema tTableSchema) { for (TColumnDesc tColumnDesc : tTableSchema.getColumns()) { columns.add(new ColumnDescriptor(tColumnDesc)); } }
public static ColumnDescriptor newPrimitiveColumnDescriptor(String name, String comment, Type type, int position) { // Current usage looks like it's only for metadata columns, but if that changes then // this method may need to require a type qualifiers aruments. return new ColumnDescriptor(name, comment, new TypeDescriptor(type), position); }
public static ColumnDescriptor newPrimitiveColumnDescriptor(String name, String comment, Type type, int position) { // Current usage looks like it's only for metadata columns, but if that changes then // this method may need to require a type qualifiers aruments. return new ColumnDescriptor(name, comment, new TypeDescriptor(type), position); }
public static ColumnDescriptor newPrimitiveColumnDescriptor(String name, String comment, Type type, int position) { // Current usage looks like it's only for metadata columns, but if that changes then // this method may need to require a type qualifiers aruments. return new ColumnDescriptor(name, comment, new TypeDescriptor(type), position); }
public static ColumnDescriptor newPrimitiveColumnDescriptor(String name, String comment, Type type, int position) { // Current usage looks like it's only for metadata columns, but if that changes then // this method may need to require a type qualifiers aruments. return new ColumnDescriptor(name, comment, new TypeDescriptor(type), position); }
public static ColumnDescriptor newPrimitiveColumnDescriptor(String name, String comment, Type type, int position) { // Current usage looks like it's only for metadata columns, but if that changes then // this method may need to require a type qualifiers aruments. return new ColumnDescriptor(name, comment, new TypeDescriptor(type), position); }
public TableSchema(List<FieldSchema> fieldSchemas) { int pos = 1; for (FieldSchema field : fieldSchemas) { columns.add(new ColumnDescriptor(field.getName(), field.getComment(), new TypeDescriptor( field.getType()), pos++)); } }
@Override public ColumnDescriptor deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException { ObjectCodec oc = jsonParser.getCodec(); JsonNode node = oc.readTree(jsonParser); Type t = Type.getType(node.get("type").asText()); return new ColumnDescriptor(node.get("name").asText(), node.get("comment").asText(), new TypeDescriptor(t), node.get("position").asInt()); } });
public static LensResultSetMetadata createMockedResultSetWithoutComma() { return new MockLensResultSetMetadata(Lists.newArrayList( new ColumnDescriptor("firstcol", "", new TypeDescriptor("int"), 0), new ColumnDescriptor("secondcol", "", new TypeDescriptor("string"), 1), new ColumnDescriptor("thirdcol", "", new TypeDescriptor("varchar(20)"), 2), new ColumnDescriptor("fourthcol", "", new TypeDescriptor("char(15)"), 3), new ColumnDescriptor("fifthcol", "", new TypeDescriptor("array<tinyint>"), 4), new ColumnDescriptor("sixthcol", "", new TypeDescriptor("struct<a:int,b:varchar(10)>"), 5), new ColumnDescriptor("seventhcol", "", new TypeDescriptor("map<int,char(10)>"), 6) )); } }
@Override public List<ColumnDescriptor> getColumns() { return Lists.newArrayList( new ColumnDescriptor("col1", "", new TypeDescriptor(Type.STRING_TYPE), 0), new ColumnDescriptor("aggr_col", "", new TypeDescriptor(Type.DOUBLE_TYPE), 1), new ColumnDescriptor("col2", "", new TypeDescriptor(Type.STRING_TYPE), 2) ); } })