Skip to content

Commit ef950eb

Browse files
author
Ivan Matantsev
committed
bool case
1 parent 62091c9 commit ef950eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.ML.Api/TypedCursor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ private Action<TRow> GenerateSetter(IRow input, int index, InternalSchemaDefinit
285285
else if (fieldType.GetElementType() == typeof(bool))
286286
{
287287
Ch.Assert(colType.ItemType.IsBool);
288-
return CreateVBufferSetter<DvBool, bool>(input, index, poke, peek, x => Convert.ToBoolean(x.RawValue));
288+
return CreateVBufferSetter<DvBool, bool>(input, index, poke, peek, x => (bool)x);
289289
}
290290
else if (fieldType.GetElementType() == typeof(bool?))
291291
{
@@ -363,7 +363,7 @@ private Action<TRow> GenerateSetter(IRow input, int index, InternalSchemaDefinit
363363
{
364364
Ch.Assert(colType.IsBool);
365365
Ch.Assert(peek == null);
366-
return CreateActionSetter<DvBool, bool>(input, index, poke, x => Convert.ToBoolean(x.RawValue));
366+
return CreateActionSetter<DvBool, bool>(input, index, poke, x => (bool)x);
367367
}
368368
else if (fieldType == typeof(bool?))
369369
{

0 commit comments

Comments
 (0)