eric-maynard commented on code in PR #13859:
URL: https://github.com/apache/iceberg/pull/13859#discussion_r2335583481


##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/data/vectorized/parquet/TestParquetVectorizedReads.java:
##########
@@ -493,6 +496,20 @@ static Stream<Arguments> goldenFilesAndEncodings() {
                                             encoding, e.getKey(), 
e.getValue(), vectorized))));
   }
 
+  private File resourceUrlToLocalFile(URL url) throws IOException, 
URISyntaxException {
+    if ("file".equals(url.getProtocol())) {
+      return Paths.get(url.toURI()).toFile();
+    }
+    String name = Paths.get(url.getPath()).getFileName().toString(); // e.g., 
string.parquet
+    String suffix = name.contains(".") ? name.substring(name.lastIndexOf('.')) 
: "";
+    Path tmp = java.nio.file.Files.createTempFile("golden-", suffix);

Review Comment:
   Previously, we access the file directly from within the module, but after 
the request to move the resources to another module, they're embedded within a 
test JAR and need to be extracted from there. As the code in 
`assertRecordsMatch` expects a `File`, we need to `createTempFile`.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to