public override bool Equals(object o) { if (o == null || o.GetType() != GetType()) { return(false); } else if (o == this) { return(true); } else { IList <StructField> other = ((OrcStructInspector)o).fields; if (other.Count != fields.Count) { return(false); } for (int i = 0; i < fields.Count; ++i) { StructField left = other[i]; StructField right = fields[i]; if (!string.Equals(left.getFieldName(), right.getFieldName(), StringComparison.OrdinalIgnoreCase) && left.getFieldObjectInspector().Equals(right.getFieldObjectInspector())) { return(false); } } return(true); } }
public override string getTypeName() { StringBuilder buffer = new StringBuilder(); buffer.Append("struct<"); for (int i = 0; i < fields.Count; ++i) { StructField field = fields[i]; if (i != 0) { buffer.Append(","); } buffer.Append(field.getFieldName()); buffer.Append(":"); buffer.Append(field.getFieldObjectInspector().getTypeName()); } buffer.Append(">"); return(buffer.ToString()); }