zhztheplayer commented on a change in pull request #10114:
URL: https://github.com/apache/arrow/pull/10114#discussion_r769211471
##########
File path:
java/dataset/src/test/java/org/apache/arrow/dataset/ParquetWriteSupport.java
##########
@@ -42,13 +43,15 @@
private final Schema avroSchema;
private final List<GenericRecord> writtenRecords = new ArrayList<>();
private final GenericRecordListBuilder recordListBuilder = new
GenericRecordListBuilder();
+ private final Random random = new Random();
public ParquetWriteSupport(String schemaName, File outputFolder) throws
Exception {
avroSchema = readSchemaFromFile(schemaName);
- path = outputFolder.getPath() + File.separator + "generated.parquet";
+ path = outputFolder.getPath() + File.separator + "generated-" +
random.nextLong() + ".parquet";
Review comment:
Doesn't milli cause collisions? `ParquetWriteSupport` is instantiated
rapidly during ut execution.
By the way any special reason to use time rather than random? The files can
be dropped after finishing ut. Users should not be aware of the files.
--
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]