stevenzwu commented on code in PR #13859:
URL: https://github.com/apache/iceberg/pull/13859#discussion_r2353367735
##########
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:
Thanks for explaining!
I was thinking about `getResourceAsStream`
```
InputStream is =
getClass().getClassLoader().getResourceAsStream(plainResourcePath.toString()
```
But I guess we don't have a `InputStreamInputFile` implementation and we
can't implement it because `JarURLInputStream` is not seekable.
--
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]