yihua commented on a change in pull request #4531:
URL: https://github.com/apache/hudi/pull/4531#discussion_r785676860
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java
##########
@@ -202,7 +202,13 @@ public static String getFileId(String fullFileName) {
public static String getRelativePartitionPath(Path basePath, Path
fullPartitionPath) {
basePath = Path.getPathWithoutSchemeAndAuthority(basePath);
fullPartitionPath =
Path.getPathWithoutSchemeAndAuthority(fullPartitionPath);
+
String fullPartitionPathStr = fullPartitionPath.toString();
+
+ if (!fullPartitionPathStr.startsWith(basePath.toString())) {
+ throw new IllegalArgumentException("Partition path does not belong to
base-path");
+ }
Review comment:
Once you add the new test I'll take another look.
##########
File path: hudi-common/pom.xml
##########
@@ -97,6 +156,13 @@
</build>
<dependencies>
+ <!-- Scala -->
+ <dependency>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-library</artifactId>
+ <version>${scala.version}</version>
+ </dependency>
+
Review comment:
Cool
--
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]