Skip to content

Commit 766569b

Browse files
authored
Avoid Boxing/Unboxing on accessing elements of VBufferDataFrameColumn (#6865)
1 parent f7b8d56 commit 766569b

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/Microsoft.Data.Analysis/PrimitiveDataFrameColumn.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,7 @@ protected override void SetValue(long rowIndex, object value)
250250
public new T? this[long rowIndex]
251251
{
252252
get => GetTypedValue(rowIndex);
253-
set
254-
{
255-
if (value == null || value.GetType() == typeof(T))
256-
{
257-
_columnContainer[rowIndex] = value;
258-
}
259-
else
260-
{
261-
throw new ArgumentException(string.Format(Strings.MismatchedValueType, DataType), nameof(value));
262-
}
263-
}
253+
set => _columnContainer[rowIndex] = value;
264254
}
265255

266256
public override double Median()

0 commit comments

Comments
 (0)