public Object getFieldValue(_Fields field) { switch (field) { case COLUMN_NAME: return getColumnName(); case TYPE_DESC: return getTypeDesc(); case POSITION: return getPosition(); case COMMENT: return getComment(); } throw new IllegalStateException(); }
public TColumnDesc toTColumnDesc() { TColumnDesc tColumnDesc = new TColumnDesc(); tColumnDesc.setColumnName(name); tColumnDesc.setComment(comment); tColumnDesc.setTypeDesc(type.toTTypeDesc()); tColumnDesc.setPosition(position); return tColumnDesc; }
case COLUMN_NAME: if (value == null) { unsetColumnName(); } else { setColumnName((String)value); unsetTypeDesc(); } else { setTypeDesc((TTypeDesc)value); unsetPosition(); } else { setPosition((Integer)value); unsetComment(); } else { setComment((String)value);
typesSb.append(","); String columnName = columns.get(pos).getColumnName(); columnNames.add(columnName); normalizedColumnNames.add(columnName.toLowerCase()); TPrimitiveTypeEntry primitiveTypeEntry = columns.get(pos).getTypeDesc().getTypes().get(0).getPrimitiveEntry(); String columnTypeName = TYPE_NAMES.get(primitiveTypeEntry.getType()); columnTypes.add(columnTypeName);
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TTableSchema struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list43 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.columns = new ArrayList<TColumnDesc>(_list43.size); TColumnDesc _elem44; for (int _i45 = 0; _i45 < _list43.size; ++_i45) { _elem44 = new TColumnDesc(); _elem44.read(iprot); struct.columns.add(_elem44); } } struct.setColumnsIsSet(true); } }
public TColumnDesc deepCopy() { return new TColumnDesc(this); }
typesSb.append(","); String columnName = columns.get(pos).getColumnName(); columnNames.add(columnName); normalizedColumnNames.add(columnName.toLowerCase()); TPrimitiveTypeEntry primitiveTypeEntry = columns.get(pos).getTypeDesc().getTypes().get(0).getPrimitiveEntry(); String columnTypeName = TYPE_NAMES.get(primitiveTypeEntry.getType()); columnTypes.add(columnTypeName);
for (int _i40 = 0; _i40 < _list38.size; ++_i40) _elem39 = new TColumnDesc(); _elem39.read(iprot); struct.columns.add(_elem39);
/** * Performs a deep copy on <i>other</i>. */ public TTableSchema(TTableSchema other) { if (other.isSetColumns()) { List<TColumnDesc> __this__columns = new ArrayList<TColumnDesc>(other.columns.size()); for (TColumnDesc other_element : other.columns) { __this__columns.add(new TColumnDesc(other_element)); } this.columns = __this__columns; } }
public ColumnDescriptor(TColumnDesc tColumnDesc) { name = tColumnDesc.getColumnName(); comment = tColumnDesc.getComment(); type = new TypeDescriptor(tColumnDesc.getTypeDesc()); position = tColumnDesc.getPosition(); }
public TColumnDesc toTColumnDesc() { TColumnDesc tColumnDesc = new TColumnDesc(); tColumnDesc.setColumnName(name); tColumnDesc.setComment(comment); tColumnDesc.setTypeDesc(type.toTTypeDesc()); tColumnDesc.setPosition(position); return tColumnDesc; }
public ColumnDescriptor(TColumnDesc tColumnDesc) { name = tColumnDesc.getColumnName(); comment = tColumnDesc.getComment(); type = new TypeDescriptor(tColumnDesc.getTypeDesc()); position = tColumnDesc.getPosition(); }