@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (getFieldsCount() > 0) { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + getFieldsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
for (int i = 0; i < table.getSchema().getFieldsCount(); i++) { ColumnProto col = table.getSchema().getFields(i); TajoDataTypes.DataType dataType = col.getDataType();
for (int i = 0; i < table.getSchema().getFieldsCount(); i++) { ColumnProto col = table.getSchema().getFields(i); org.apache.tajo.type.Type type = TypeProtobufEncoder.decode(col.getType());
/** * This Schema constructor restores a serialized schema into in-memory Schema structure. * A serialized schema is an ordered list in depth-first order over a nested schema. * This constructor transforms the list into a tree-like structure. * * @param proto */ public Schema(SchemaProto proto) { init(); List<Column> toBeAdded = TUtil.newList(); for (int i = 0; i < proto.getFieldsCount(); i++) { deserializeColumn(toBeAdded, proto.getFieldsList(), i); } for (Column c : toBeAdded) { addColumn(c); } }
public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; for (int i = 0; i < getFieldsCount(); i++) { if (!getFields(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; }