|
8 | 8 | using System.Linq;
|
9 | 9 | using System.Reflection;
|
10 | 10 | using Microsoft.ML.Data;
|
11 |
| -using Microsoft.ML.Runtime.CommandLine; |
12 | 11 | using Microsoft.ML.Runtime.Data.IO;
|
13 | 12 | using Microsoft.ML.Runtime.Internal.Utilities;
|
14 | 13 |
|
@@ -36,7 +35,7 @@ internal sealed class Transposer : ITransposeDataView, IDisposable
|
36 | 35 | public readonly int RowCount;
|
37 | 36 | // -1 for input columns that were not transposed, a non-negative index into _cols for those that were.
|
38 | 37 | private readonly int[] _inputToTransposed;
|
39 |
| - private readonly ColumnInfo[] _cols; |
| 38 | + private readonly Schema.Column[] _cols; |
40 | 39 | private readonly int[] _splitLim;
|
41 | 40 | private readonly SchemaImpl _tschema;
|
42 | 41 | private bool _disposed;
|
@@ -104,13 +103,13 @@ private Transposer(IHost host, IDataView view, bool forceSave, int[] columns)
|
104 | 103 | columnSet = columnSet.Where(c => ttschema.GetSlotType(c) == null);
|
105 | 104 | }
|
106 | 105 | columns = columnSet.ToArray();
|
107 |
| - _cols = new ColumnInfo[columns.Length]; |
| 106 | + _cols = new Schema.Column[columns.Length]; |
108 | 107 | var schema = _view.Schema;
|
109 | 108 | _nameToICol = new Dictionary<string, int>();
|
110 | 109 | _inputToTransposed = Utils.CreateArray(schema.Count, -1);
|
111 | 110 | for (int c = 0; c < columns.Length; ++c)
|
112 | 111 | {
|
113 |
| - _nameToICol[(_cols[c] = ColumnInfo.CreateFromIndex(schema, columns[c])).Name] = c; |
| 112 | + _nameToICol[(_cols[c] = schema[columns[c]]).Name] = c; |
114 | 113 | _inputToTransposed[columns[c]] = c;
|
115 | 114 | }
|
116 | 115 |
|
@@ -305,7 +304,7 @@ public SchemaImpl(Transposer parent)
|
305 | 304 | _slotTypes = new VectorType[_parent._cols.Length];
|
306 | 305 | for (int c = 0; c < _slotTypes.Length; ++c)
|
307 | 306 | {
|
308 |
| - ColumnInfo srcInfo = _parent._cols[c]; |
| 307 | + var srcInfo = _parent._cols[c]; |
309 | 308 | var ctype = srcInfo.Type.ItemType;
|
310 | 309 | var primitiveType = ctype as PrimitiveType;
|
311 | 310 | _ectx.Assert(primitiveType != null);
|
|
0 commit comments