File tree 1 file changed +8
-6
lines changed
oshdb-api/src/main/java/org/heigit/ohsome/oshdb/api/mapreducer/backend
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
package org .heigit .ohsome .oshdb .api .mapreducer .backend ;
2
2
3
+ import static java .util .stream .Collectors .joining ;
4
+
3
5
import java .io .IOException ;
4
6
import java .io .ObjectInputStream ;
5
7
import java .sql .ResultSet ;
@@ -58,13 +60,13 @@ protected GridOSHEntity readOshCellRawData(ResultSet oshCellsRawData)
58
60
}
59
61
60
62
protected String sqlQuery () {
61
- var sqlQuery = this .typeFilter .stream ()
62
- .map (
63
- osmType -> TableNames .forOSMType (osmType ).map (tn -> tn .toString (this .oshdb .prefix ())))
64
- .filter (Optional ::isPresent ).map (Optional ::get )
63
+ return this .typeFilter .stream ()
64
+ .map (osmType -> TableNames .forOSMType (osmType )
65
+ .map (tn -> tn .toString (this .oshdb .prefix ())))
66
+ .filter (Optional ::isPresent )
67
+ .map (Optional ::get )
65
68
.map (tn -> "(select data from " + tn + " where level = ?1 and id between ?2 and ?3)" )
66
- .collect (Collectors .joining (" union all " ));
67
- return sqlQuery ;
69
+ .collect (joining (" union all " ));
68
70
}
69
71
70
72
@ Nonnull
You can’t perform that action at this time.
0 commit comments