sreejasahithi commented on code in PR #10187:
URL: https://github.com/apache/ozone/pull/10187#discussion_r3187953205
##########
hadoop-ozone/iceberg/src/test/java/org/apache/hadoop/ozone/iceberg/TestRewriteTablePathOzoneAction.java:
##########
@@ -188,6 +189,51 @@ void tablePathRewriteForStartAndEndVersionProvided()
throws Exception {
assertAllInternalPathsRewritten(csvPairs, targetPrefix);
}
+ @Test
+ void executeRejectsMissingLocationPrefix() {
+ NullPointerException exception = assertThrows(NullPointerException.class,
+ () -> new RewriteTablePathOzoneAction(table)
+ .stagingLocation(stagingDir.toString() + "/")
+ .execute());
+
+ assertEquals("Source prefix is null", exception.getMessage());
+ }
Review Comment:
Updating my earlier comment: while the CLI will enforce that source and
target prefixes are set, I think it would be fine to keep this null check and
the test as a defensive safeguard. It protects against misuse outside the CLI
path and makes the contract of `execute()` clearer.
--
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]