Skip to content

Commit

Permalink
refactor(common): move the geospatial module to the base SQL backend
Browse files Browse the repository at this point in the history
it contains routines to compile geospatial values as SQL

BREAKING CHANGE: removed `ibis.common.geospatial`, import the functions from `ibis.backends.base.sql.registry.geospatial`
  • Loading branch information
kszucs committed Feb 8, 2023
1 parent b4fcef1 commit 239bc78
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
File renamed without changes.
3 changes: 1 addition & 2 deletions ibis/backends/postgres/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql as pg

import ibis.backends.base.sql.registry.geospatial as geo
import ibis.common.exceptions as com
import ibis.common.geospatial as geo
import ibis.expr.datatypes as dt
import ibis.expr.operations as ops

Expand Down Expand Up @@ -383,7 +383,6 @@ def _literal(t, op):
return sa.literal_column(f"INTERVAL '{value} {dtype.resolution}'")
elif dtype.is_set():
return list(map(sa.literal, value))
# geo spatial data type
elif dtype.is_geospatial():
# inline_metadata ex: 'SRID=4326;POINT( ... )'
return sa.literal_column(geo.translate_literal(op, inline_metadata=True))
Expand Down

0 comments on commit 239bc78

Please sign in to comment.