Skip to content
Merged
Show file tree
Hide file tree
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 @@ -22,7 +22,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

abstract class ReflectClassValidator {
Expand All @@ -33,7 +32,7 @@ static class PackageValidator extends ReflectClassValidator {

private final List<String> trustedPackagePrefixes = Stream.of(AvroConverters.SERIALIZABLE_PACKAGES)
.map(p -> p.endsWith(".") ? p : p + ".")
.collect(Collectors.toList());
.toList();
private final boolean trustAllPackages =
trustedPackagePrefixes.size() == 1 && "*".equals(trustedPackagePrefixes.get(0));
// The primitive "class names" based on Class.isPrimitive()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import org.apache.parquet.filter2.recordlevel.IncrementallyUpdatedFilterPredicate.ValueInspector;
import org.apache.parquet.hadoop.metadata.ColumnPath;
import org.apache.parquet.io.PrimitiveColumnIO;
Expand Down Expand Up @@ -65,7 +64,7 @@ public FilteringRecordMaterializer(

for (PrimitiveColumnIO c : columnIOs) {
List<Integer> indexFieldPath =
Arrays.stream(c.getIndexFieldPath()).boxed().collect(Collectors.toList());
Arrays.stream(c.getIndexFieldPath()).boxed().toList();
columnIOsByIndexFieldPath.put(indexFieldPath, c);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
import java.util.zip.CRC32;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
Expand Down Expand Up @@ -415,7 +414,7 @@ private static List<FileStatus> listFiles(Configuration conf, FileStatus fileSta
throw new RuntimeException(e);
}
})
.collect(Collectors.toList());
.toList();
} else {
return Collections.singletonList(fileStatus);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public ParquetRewriter(RewriteOptions options) throws IOException {
"Start rewriting {} input file(s) {} to {}",
inputFiles.size() + inputFilesToJoin.size(),
Stream.concat(options.getParquetInputFiles().stream(), options.getParquetInputFilesToJoin().stream())
.collect(Collectors.toList()),
.toList(),
out);

if (options.getMaskColumns() != null) {
Expand Down Expand Up @@ -298,7 +298,7 @@ private Map<String, String> getExtraMetadata(RewriteOptions options) {
allFiles = new ArrayList<>(inputFiles);
} else {
allFiles = Stream.concat(inputFiles.stream(), inputFilesToJoin.stream())
.collect(Collectors.toList());
.toList();
}
Map<String, String> result = new HashMap<>();
result.put(
Expand All @@ -317,10 +317,10 @@ private void ensureRowCount() {
if (!inputFilesToJoin.isEmpty()) {
List<Long> blocksRowCountsL = inputFiles.stream()
.flatMap(x -> x.getFooter().getBlocks().stream().map(BlockMetaData::getRowCount))
.collect(Collectors.toList());
.toList();
List<Long> blocksRowCountsR = inputFilesToJoin.stream()
.flatMap(x -> x.getFooter().getBlocks().stream().map(BlockMetaData::getRowCount))
.collect(Collectors.toList());
.toList();
if (!blocksRowCountsL.equals(blocksRowCountsR)) {
throw new IllegalArgumentException(
"The number of rows in each block must match! Left blocks row counts: " + blocksRowCountsL
Expand Down
Loading