Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,13 @@ void test() {
DataQuantaBuilder<?, String> textFileSource = plan.readTextFile(uri.toString());

if (random) {
// Assign random keys for shuffling, then sort by those keys
// This avoids comparator contract violations from r.nextInt()
Random r = new Random();
textFileSource = textFileSource.sort(e -> r.nextInt());
textFileSource = textFileSource
.map(line -> new Tuple<>(r.nextDouble(), line))
.sort(tuple -> tuple.field0)
.map(tuple -> tuple.field1);
}

MapDataQuantaBuilder<String, Tuple<float[], Integer>> mapXY = textFileSource.map(line -> {
Expand Down
Loading