@Test
public void testCompatibleRowsDataTableTransformation()
throws Exception {
Collection<Serializable[]> rows = new ArrayList<>(2);
rows.add(_row1.clone());
rows.add(_compatibleRow1.clone());
DataSchema dataSchema = _dataSchema.clone();
Assert.assertTrue(dataSchema.isTypeCompatibleWith(_compatibleDataSchema));
dataSchema.upgradeToCover(_compatibleDataSchema);
Assert.assertEquals(dataSchema, _upgradedDataSchema);
DataTable dataTable = SelectionOperatorUtils.getDataTableFromRows(rows, dataSchema);
Serializable[] expectedRow1 =
{0L, 1.0, 2.0, 3.0, "4", new long[]{5L}, new double[]{6.0}, new double[]{7.0}, new double[]{8.0}, new String[]{"9"}};
Serializable[] expectedCompatibleRow1 =
{1L, 2.0, 3.0, 4.0, "5", new long[]{6L}, new double[]{7.0}, new double[]{8.0}, new double[]{9.0}, new String[]{"10"}};
Assert.assertEquals(SelectionOperatorUtils.extractRowFromDataTable(dataTable, 0), expectedRow1);
Assert.assertEquals(SelectionOperatorUtils.extractRowFromDataTable(dataTable, 1), expectedCompatibleRow1);
}