Skip to content

Commit 7536c97

Browse files
committed
refactor: fix geo_x and geo_y ops
1 parent 5d6ec4f commit 7536c97

File tree

3 files changed

+4
-4
lines changed
  • bigframes/core/compile/sqlglot/expressions
  • tests/unit/core/compile/sqlglot/expressions/snapshots/test_geo_ops

3 files changed

+4
-4
lines changed

bigframes/core/compile/sqlglot/expressions/geo_ops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ def _(expr: TypedExpr, op: ops.GeoStSimplifyOp) -> sge.Expression:
108108

109109
@register_unary_op(ops.geo_x_op)
110110
def _(expr: TypedExpr) -> sge.Expression:
111-
return sge.func("SAFE.ST_X", expr.expr)
111+
return sge.func("ST_X", expr.expr)
112112

113113

114114
@register_unary_op(ops.geo_y_op)
115115
def _(expr: TypedExpr) -> sge.Expression:
116-
return sge.func("SAFE.ST_Y", expr.expr)
116+
return sge.func("ST_Y", expr.expr)
117117

118118

119119
@register_binary_op(ops.GeoStDistanceOp, pass_op=True)

tests/unit/core/compile/sqlglot/expressions/snapshots/test_geo_ops/test_geo_x/out.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
SAFE.ST_X(`geography_col`) AS `bfcol_1`
8+
ST_X(`geography_col`) AS `bfcol_1`
99
FROM `bfcte_0`
1010
)
1111
SELECT

tests/unit/core/compile/sqlglot/expressions/snapshots/test_geo_ops/test_geo_y/out.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WITH `bfcte_0` AS (
55
), `bfcte_1` AS (
66
SELECT
77
*,
8-
SAFE.ST_Y(`geography_col`) AS `bfcol_1`
8+
ST_Y(`geography_col`) AS `bfcol_1`
99
FROM `bfcte_0`
1010
)
1111
SELECT

0 commit comments

Comments
 (0)