Skip to content

Commit a99831b

Browse files
committed
undo DvBool.
1 parent 46299b8 commit a99831b

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

src/Microsoft.ML.Core/Data/ColumnType.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -624,17 +624,6 @@ public static BoolType Instance
624624
}
625625
}
626626

627-
private static volatile BoolType _ninstance;
628-
public static BoolType NInstance
629-
{
630-
get
631-
{
632-
if (_ninstance == null)
633-
Interlocked.CompareExchange(ref _ninstance, new BoolType(DataKind.NBL, "NBool"), null);
634-
return _ninstance;
635-
}
636-
}
637-
638627
private readonly string _name;
639628

640629
private BoolType(DataKind kind, string name)

src/Microsoft.ML.Core/Data/DataKind.cs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ public enum DataKind : byte
5050
NI1 = 17,
5151
NI2 = 18,
5252
NI4 = 19,
53-
NI8 = 20,
54-
#pragma warning disable MSML_GeneralName
55-
NBL = 21,
56-
#pragma warning restore MSML_GeneralName
53+
NI8 = 20
5754
}
5855

5956
/// <summary>
@@ -62,7 +59,7 @@ public enum DataKind : byte
6259
public static class DataKindExtensions
6360
{
6461
public const DataKind KindMin = DataKind.I1;
65-
public const DataKind KindLim = DataKind.NBL + 1;
62+
public const DataKind KindLim = DataKind.NI8 + 1;
6663
public const int KindCount = KindLim - KindMin;
6764

6865
/// <summary>
@@ -186,9 +183,7 @@ public static Type ToType(this DataKind kind)
186183
case DataKind.TX:
187184
return typeof(DvText);
188185
case DataKind.BL:
189-
return typeof(bool);
190-
case DataKind.NBL:
191-
return typeof(bool?);
186+
return typeof(DvBool);
192187
case DataKind.TS:
193188
return typeof(DvTimeSpan);
194189
case DataKind.DT:
@@ -240,10 +235,8 @@ public static bool TryGetDataKind(this Type type, out DataKind kind)
240235
kind = DataKind.R8;
241236
else if (type == typeof(DvText))
242237
kind = DataKind.TX;
243-
else if (type == typeof(bool))
238+
else if (type == typeof(bool) || type == typeof(bool?))
244239
kind = DataKind.BL;
245-
else if (type == typeof(bool?))
246-
kind = DataKind.NBL;
247240
else if (type == typeof(DvTimeSpan))
248241
kind = DataKind.TS;
249242
else if (type == typeof(DvDateTime))
@@ -299,8 +292,6 @@ public static string GetString(this DataKind kind)
299292
return "R8";
300293
case DataKind.BL:
301294
return "BL";
302-
case DataKind.NBL:
303-
return "NBL";
304295
case DataKind.TX:
305296
return "TX";
306297
case DataKind.TS:

0 commit comments

Comments
 (0)