diff --git a/java/src/test/java/ai/rapids/cudf/TableTest.java b/java/src/test/java/ai/rapids/cudf/TableTest.java index 9f34006043a..7be1ca2118b 100644 --- a/java/src/test/java/ai/rapids/cudf/TableTest.java +++ b/java/src/test/java/ai/rapids/cudf/TableTest.java @@ -8557,20 +8557,16 @@ void testExplodeOuterPosition() { @Test void testSample() { try (Table t = new Table.TestBuilder().column("s1", "s2", "s3", "s4", "s5").build()) { - try (Table ret = t.sample(3, false, 0); - Table expected = new Table.TestBuilder().column("s3", "s4", "s5").build()) { - assertTablesAreEqual(expected, ret); + try (Table ret = t.sample(3, false, 0)) { + assertEquals(ret.getRowCount(), 3); } - try (Table ret = t.sample(5, false, 0); - Table expected = new Table.TestBuilder().column("s3", "s4", "s5", "s2", "s1").build()) { - assertTablesAreEqual(expected, ret); + try (Table ret = t.sample(5, false, 0)) { + assertEquals(ret.getRowCount(), 5); } - try (Table ret = t.sample(8, true, 0); - Table expected = new Table.TestBuilder() - .column("s1", "s1", "s4", "s5", "s5", "s1", "s3", "s2").build()) { - assertTablesAreEqual(expected, ret); + try (Table ret = t.sample(8, true, 0)) { + assertEquals(ret.getRowCount(), 8); } } }