internal static IEnumerable <int> GetColumnSet(this Schema schema, string metadataKind, string value)
 {
     for (int col = 0; col < schema.Count; col++)
     {
         var columnType = schema[col].Metadata.Schema.GetColumnOrNull(metadataKind)?.Type;
         if (columnType != null && columnType.IsText)
         {
             ReadOnlyMemory <char> val = default;
             schema[col].Metadata.GetValue(metadataKind, ref val);
             if (ReadOnlyMemoryUtils.EqualsStr(value, val))
             {
                 yield return(col);
             }
         }
     }
 }
 /// <summary>
 /// Returns the set of column ids which match the value of specified annotation kind.
 /// The annotation type should be of type text.
 /// </summary>
 public static IEnumerable <int> GetColumnSet(this DataViewSchema schema, string annotationKind, string value)
 {
     for (int col = 0; col < schema.Count; col++)
     {
         var columnType = schema[col].Annotations.Schema.GetColumnOrNull(annotationKind)?.Type;
         if (columnType is TextDataViewType)
         {
             ReadOnlyMemory <char> val = default;
             schema[col].Annotations.GetValue(annotationKind, ref val);
             if (ReadOnlyMemoryUtils.EqualsStr(value, val))
             {
                 yield return(col);
             }
         }
     }
 }