You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public PrimitiveDataFrameColumn Clone(IEnumerable mapIndices) - crashes with System.ArgumentOutOfRangeException: 'rowIndex Parameter name: Index cannot be greater than the Column's Length' exception
Simple unti test:
[Fact]
public void TestNotNullableColumnCloneWithIndicesMapAsEnumerable()
{
//Arrange
var column = new Int32DataFrameColumn("Int column", values: new[] { 0, 5, 2, 4, 1, 3 });
var indicesMap = new long[] { 0, 1, 2, 5, 3, 4 };
//Act
var clonedColumn = column.Clone(indicesMap);
//Assert
Assert.NotSame(column, clonedColumn);
Assert.Equal(column.Name, clonedColumn.Name);
Assert.Equal(column.DataType, clonedColumn.DataType);
Assert.Equal(column.NullCount, clonedColumn.NullCount);
Assert.Equal(indicesMap.Length, clonedColumn.Length);
for (int i = 0; i < indicesMap.Length; i++)
Assert.Equal(column[indicesMap[i]], clonedColumn[i]);
}