public override int GetHashCode() { int hashcode = 157; unchecked { if (isset.layout) { hashcode = (hashcode * 397) + Layout.GetHashCode(); } if (isset.keyless) { hashcode = (hashcode * 397) + Keyless.GetHashCode(); } if (isset.entry_count) { hashcode = (hashcode * 397) + Entry_count.GetHashCode(); } if (isset.idx_target_as_key) { hashcode = (hashcode * 397) + Idx_target_as_key.GetHashCode(); } if (isset.min_val) { hashcode = (hashcode * 397) + Min_val.GetHashCode(); } if (isset.max_val) { hashcode = (hashcode * 397) + Max_val.GetHashCode(); } if (isset.bucket) { hashcode = (hashcode * 397) + Bucket.GetHashCode(); } if (isset.group_col_widths) { hashcode = (hashcode * 397) + TCollections.GetHashCode(Group_col_widths); } if (isset.key_bytewidth) { hashcode = (hashcode * 397) + Key_bytewidth.GetHashCode(); } if (isset.col_slot_context) { hashcode = (hashcode * 397) + Col_slot_context.GetHashCode(); } if (isset.target_groupby_indices) { hashcode = (hashcode * 397) + TCollections.GetHashCode(Target_groupby_indices); } if (isset.count_distinct_descriptors) { hashcode = (hashcode * 397) + Count_distinct_descriptors.GetHashCode(); } if (isset.force_4byte_float) { hashcode = (hashcode * 397) + Force_4byte_float.GetHashCode(); } } return(hashcode); }
public override string ToString() { var sb = new StringBuilder("TResultSetBufferDescriptor("); bool __first = true; if (isset.layout) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Layout: "); sb.Append(Layout); } if (isset.keyless) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Keyless: "); sb.Append(Keyless); } if (isset.entry_count) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Entry_count: "); sb.Append(Entry_count); } if (isset.idx_target_as_key) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Idx_target_as_key: "); sb.Append(Idx_target_as_key); } if (isset.min_val) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Min_val: "); sb.Append(Min_val); } if (isset.max_val) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Max_val: "); sb.Append(Max_val); } if (isset.bucket) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Bucket: "); sb.Append(Bucket); } if (Group_col_widths != null && isset.group_col_widths) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Group_col_widths: "); sb.Append(Group_col_widths); } if (isset.key_bytewidth) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Key_bytewidth: "); sb.Append(Key_bytewidth); } if (Col_slot_context != null && isset.col_slot_context) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Col_slot_context: "); sb.Append(Col_slot_context == null ? "<null>" : Col_slot_context.ToString()); } if (Target_groupby_indices != null && isset.target_groupby_indices) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Target_groupby_indices: "); sb.Append(Target_groupby_indices); } if (Count_distinct_descriptors != null && isset.count_distinct_descriptors) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Count_distinct_descriptors: "); sb.Append(Count_distinct_descriptors); } if (isset.force_4byte_float) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Force_4byte_float: "); sb.Append(Force_4byte_float); } sb.Append(")"); return(sb.ToString()); }
public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("TResultSetBufferDescriptor"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (isset.layout) { field.Name = "layout"; field.Type = TType.I32; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI32Async((int)Layout, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.keyless) { field.Name = "keyless"; field.Type = TType.Bool; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBoolAsync(Keyless, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.entry_count) { field.Name = "entry_count"; field.Type = TType.I32; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI32Async(Entry_count, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.idx_target_as_key) { field.Name = "idx_target_as_key"; field.Type = TType.I32; field.ID = 4; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI32Async(Idx_target_as_key, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.min_val) { field.Name = "min_val"; field.Type = TType.I64; field.ID = 5; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI64Async(Min_val, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.max_val) { field.Name = "max_val"; field.Type = TType.I64; field.ID = 6; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI64Async(Max_val, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.bucket) { field.Name = "bucket"; field.Type = TType.I64; field.ID = 7; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI64Async(Bucket, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (Group_col_widths != null && isset.group_col_widths) { field.Name = "group_col_widths"; field.Type = TType.List; field.ID = 8; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.I16, Group_col_widths.Count), cancellationToken); foreach (short _iter21 in Group_col_widths) { await oprot.WriteI16Async(_iter21, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.key_bytewidth) { field.Name = "key_bytewidth"; field.Type = TType.I16; field.ID = 9; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI16Async(Key_bytewidth, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (Col_slot_context != null && isset.col_slot_context) { field.Name = "col_slot_context"; field.Type = TType.Struct; field.ID = 10; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Col_slot_context.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (Target_groupby_indices != null && isset.target_groupby_indices) { field.Name = "target_groupby_indices"; field.Type = TType.List; field.ID = 11; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.I32, Target_groupby_indices.Count), cancellationToken); foreach (int _iter22 in Target_groupby_indices) { await oprot.WriteI32Async(_iter22, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (Count_distinct_descriptors != null && isset.count_distinct_descriptors) { field.Name = "count_distinct_descriptors"; field.Type = TType.List; field.ID = 12; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.Struct, Count_distinct_descriptors.Count), cancellationToken); foreach (TCountDistinctDescriptor _iter23 in Count_distinct_descriptors) { await _iter23.WriteAsync(oprot, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (isset.force_4byte_float) { field.Name = "force_4byte_float"; field.Type = TType.Bool; field.ID = 13; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBoolAsync(Force_4byte_float, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }