Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed May 19, 2024
1 parent 6da3eb1 commit a3495d2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,9 @@ public Planetiler addParquetSource(String name, List<Path> paths, boolean hivePa
for (var path : paths) {
inputPaths.add(new InputPath(name, path, false));
}
return addStage(name, "Process features in " + paths, ifSourceUsed(name, () -> {
new ParquetReader(name, profile, stats, getId, getLayer, hivePartitioning).process(paths, featureGroup,
config);
}));
return addStage(name, "Process features in " + paths,
ifSourceUsed(name, () -> new ParquetReader(name, profile, stats, getId, getLayer, hivePartitioning)
.process(paths, featureGroup, config)));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* coordinate lists to JTS geometries.
*/
class GeoArrow {
private GeoArrow() {}

// TODO create packed coordinate arrays while reading parquet values to avoid creating so many intermediate objects
static MultiPolygon multipolygon(List<List<List<Object>>> list) {
return GeoUtils.createMultiPolygon(map(list, GeoArrow::polygon));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ public void start() {
}

@Override
public void end() {}
public void end() {
// don't need to do anything
}
}

private abstract static class Primitive extends PrimitiveConverter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
* {@link org.apache.parquet.hadoop.metadata.CompressionCodecName} to allow deserializing parquet files that use lz4
* compression.
*/
@SuppressWarnings("java:S2176")
public class Lz4Codec extends io.airlift.compress.lz4.Lz4Codec {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* their constructors are package-private.
*/
public class Filters {
private Filters() {}

public static Operators.DoubleColumn doubleColumn(List<String> parts) {
return new Operators.DoubleColumn(ColumnPath.get(parts.toArray(String[]::new)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ void testReadBostonWithBboxFilterNotCovering(Path path) {
}

@TestFactory
@SuppressWarnings("java:S5961")
List<DynamicTest> testReadAllDataTypes() {

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ void testWalkPathWithPattern() throws IOException {
Files.writeString(path, "test");
assertEquals(List.of(path), Glob.of(tmpDir).resolve("a", "*", "c.txt").find());
System.err.println(Glob.of(tmpDir).resolve("*", "*", "c.txt"));
System.err.println(Glob.of(tmpDir).resolve("**", "c.txt"));
System.err.println(Glob.of(tmpDir).resolve("*", "b", "c.txt"));
System.err.println(Glob.of(tmpDir).resolve("*", "*", "c.txt").find());
System.err.println(Glob.of(tmpDir).resolve("**", "c.txt").find());
System.err.println(Glob.of(tmpDir).resolve("*", "b", "c.txt").find());
assertEquals(List.of(path), Glob.of(tmpDir).resolve("*", "*", "c.txt").find());
assertEquals(List.of(path), Glob.of(tmpDir).resolve("a", "b", "c.txt").find());
}
Expand Down

0 comments on commit a3495d2

Please sign in to comment.