Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 9907c2b

Browse files
committed
avoid option type in st_buffer
1 parent 71a80c0 commit 9907c2b

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

bigframes/bigquery/_operations/geo.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import annotations
1616

17-
from typing import Optional, Union
17+
from typing import Union
1818

1919
import shapely # type: ignore
2020

@@ -106,10 +106,10 @@ def st_area(
106106
def st_buffer(
107107
series: Union[bigframes.series.Series, bigframes.geopandas.GeoSeries],
108108
buffer_radius: float,
109-
num_seg_quarter_circle: Optional[float] = None,
110-
use_spheroid: Optional[bool] = None,
111-
endcap: Optional[str] = None,
112-
side: Optional[str] = None,
109+
num_seg_quarter_circle: float = 8.0,
110+
use_spheroid: bool = False,
111+
endcap: str = "ROUND",
112+
side: str = "BOTH",
113113
) -> bigframes.series.Series:
114114
"""
115115
Computes a `GEOGRAPHY` that represents all points whose distance from the

bigframes/core/compile/scalar_op_compiler.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,10 +1043,10 @@ def geo_st_buffer_op_impl(x: ibis_types.Value, op: ops.GeoStBufferOp):
10431043
return st_buffer(
10441044
x,
10451045
op.buffer_radius,
1046-
num_seg_quarter_circle=op.num_seg_quarter_circle,
1047-
use_spheroid=op.use_spheroid,
1048-
endcap=op.endcap,
1049-
side=op.side,
1046+
op.num_seg_quarter_circle,
1047+
op.use_spheroid,
1048+
op.endcap,
1049+
op.side,
10501050
)
10511051

10521052

@@ -2166,13 +2166,13 @@ def st_boundary(a: ibis_dtypes.geography) -> ibis_dtypes.geography: # type: ign
21662166

21672167
@ibis_udf.scalar.builtin
21682168
def st_buffer(
2169-
geography: ibis_types.GeoValue,
2169+
geography: ibis_dtypes.Geography,
21702170
buffer_radius: ibis_dtypes.Float64,
2171-
num_seg_quarter_circle: typing.Optional[ibis_dtypes.Float64] = None,
2172-
use_spheroid: typing.Optional[ibis_types.BooleanValue] = None,
2173-
endcap: typing.Optional[ibis_types.StringValue] = None,
2174-
side: typing.Optional[ibis_types.StringValue] = None,
2175-
) -> ibis_types.GeoValue:
2171+
num_seg_quarter_circle: ibis_dtypes.Float64 = 8.0,
2172+
use_spheroid: ibis_dtypes.Boolean = False,
2173+
endcap: ibis_dtypes.String = "ROUND",
2174+
side: ibis_dtypes.String = "BOTH",
2175+
) -> ibis_dtypes.Geography:
21762176
...
21772177

21782178

0 commit comments

Comments
 (0)