predator4ann commented on code in PR #7697:
URL: https://github.com/apache/gravitino/pull/7697#discussion_r2207612631


##########
integration-test-common/src/test/java/org/apache/gravitino/integration/test/util/DownloaderUtils.java:
##########
@@ -61,8 +79,106 @@ public static void downloadFile(String fileUrl, String... 
destinationDirectories
     }
   }
 
-  private static String getFileName(URL url) {
-    String[] pathSegments = url.getPath().split("/");
+  /**
+   * Check and clean driver version conflicts in directories
+   *
+   * @param targetUrl Target driver URL
+   * @param directories Directories to check
+   * @throws IOException If file operations fail
+   */
+  private static void checkAndCleanDriverConflicts(String targetUrl, String... 
directories)
+      throws IOException {
+    String expectedFileName = getFileName(targetUrl);
+    String expectedVersion = extractVersion(expectedFileName);
+    String driverType = getDriverType(expectedFileName);
+
+    if (expectedVersion == null || driverType == null) {
+      LOG.warn("Unable to extract driver version or type from URL: {}", 
targetUrl);
+      return;

Review Comment:
   When a driver types that does not support replacement is used, 
expectedVersion and driverType will be null. For example: download an 
iceberg-aliyun-xxx.jar or paimon-oss-xxx.jar.



-- 
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]

Reply via email to