pvary commented on code in PR #9161:
URL: https://github.com/apache/iceberg/pull/9161#discussion_r1428116580
##########
parquet/src/test/java/org/apache/iceberg/parquet/TestDictionaryRowGroupFilter.java:
##########
@@ -223,52 +219,33 @@ public void createInputFile() throws IOException {
dictionaryStore = reader.getNextDictionaryReader();
}
- @Test
+ @TestTemplate
public void testAssumptions() {
// this case validates that other cases don't need to test expressions
with null literals.
- TestHelpers.assertThrows(
- "Should reject null literal in equal expression",
- NullPointerException.class,
- "Cannot create expression literal from null",
- () -> equal("col", null));
- TestHelpers.assertThrows(
- "Should reject null literal in notEqual expression",
- NullPointerException.class,
- "Cannot create expression literal from null",
- () -> notEqual("col", null));
- TestHelpers.assertThrows(
- "Should reject null literal in lessThan expression",
- NullPointerException.class,
- "Cannot create expression literal from null",
- () -> lessThan("col", null));
- TestHelpers.assertThrows(
- "Should reject null literal in lessThanOrEqual expression",
- NullPointerException.class,
- "Cannot create expression literal from null",
- () -> lessThanOrEqual("col", null));
- TestHelpers.assertThrows(
- "Should reject null literal in greaterThan expression",
- NullPointerException.class,
- "Cannot create expression literal from null",
- () -> greaterThan("col", null));
- TestHelpers.assertThrows(
- "Should reject null literal in greaterThanOrEqual expression",
- NullPointerException.class,
- "Cannot create expression literal from null",
- () -> greaterThanOrEqual("col", null));
- TestHelpers.assertThrows(
- "Should reject null literal in startsWith expression",
- NullPointerException.class,
- "Cannot create expression literal from null",
- () -> startsWith("col", null));
- TestHelpers.assertThrows(
- "Should reject null literal in notStartsWith expression",
- NullPointerException.class,
- "Cannot create expression literal from null",
- () -> notStartsWith("col", null));
+ Assertions.assertThatThrownBy(() -> equal("col", null))
Review Comment:
nit: Could we do a static import for this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]