Skip to content

Commit

Permalink
fix: Add .scalar_subquery to get rid of the warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
rsavoye committed Oct 31, 2023
1 parent e872661 commit 79a86a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions osm_rawdata/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def importThread(
ewkt = shape(feature["geometry"])
geom = wkb.dumps(ewkt)
type = ewkt.geom_type
scalar = select(cast(tags, JSONB))
scalar = select(cast(tags, JSONB)).scalar_subquery()

if type == 'Polygon':
sql = insert(ways).values(
Expand Down Expand Up @@ -183,7 +183,7 @@ def parquetThread(
hex = wkb.loads(geom, hex=True)
gdata = geoalchemy2.shape.from_shape(hex, srid=4326, extended=True)
# geom_type = wkb.loads(geom).geom_type
scalar = select(cast(tags['properties'], JSONB))
scalar = select(cast(tags['properties'], JSONB)).scalar_subquery()
sql = None
if hex.geom_type == 'Polygon':
sql = insert(ways).values(
Expand Down Expand Up @@ -338,7 +338,7 @@ def importParquet(
return True

index = 0
with concurrent.futures.ThreadPoolExecutor(max_workers=cores) as executor:
with concurrent.futures.ProcessPoolExecutor(max_workers=cores) as executor:
block = 0
while block <= entries:
if len(overture.data[block : block + chunk]) == 0:
Expand Down

0 comments on commit 79a86a3

Please sign in to comment.