Skip to content

Commit 0490463

Browse files
fix style
1 parent 1ffd2b4 commit 0490463

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

bigframes/core/compile/polars/operations/generic_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def isnull_op_impl(
4848

4949

5050
@polars_compiler.register_op(generic_ops.PyUdfOp)
51-
def pyudf_op_impl(
51+
def py_udf_op_impl(
5252
compiler: polars_compiler.PolarsExpressionCompiler,
5353
op: generic_ops.PyUdfOp, # type: ignore
5454
input: pl.Expr,

tests/system/small/engines/test_generic_ops.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def test_engines_astype_int(scalars_array_value: array_value.ArrayValue, engine)
5959
ops.AsTypeOp(to_type=bigframes.dtypes.INT_DTYPE),
6060
excluded_cols=["string_col"],
6161
)
62+
6263
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
6364

6465

@@ -73,6 +74,7 @@ def test_engines_astype_string_int(scalars_array_value: array_value.ArrayValue,
7374
for val in vals
7475
]
7576
)
77+
7678
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
7779

7880

@@ -83,6 +85,7 @@ def test_engines_astype_float(scalars_array_value: array_value.ArrayValue, engin
8385
ops.AsTypeOp(to_type=bigframes.dtypes.FLOAT_DTYPE),
8486
excluded_cols=["string_col"],
8587
)
88+
8689
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
8790

8891

@@ -99,6 +102,7 @@ def test_engines_astype_string_float(
99102
for val in vals
100103
]
101104
)
105+
102106
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
103107

104108

@@ -107,6 +111,7 @@ def test_engines_astype_bool(scalars_array_value: array_value.ArrayValue, engine
107111
arr = apply_op(
108112
scalars_array_value, ops.AsTypeOp(to_type=bigframes.dtypes.BOOL_DTYPE)
109113
)
114+
110115
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
111116

112117

@@ -118,6 +123,7 @@ def test_engines_astype_string(scalars_array_value: array_value.ArrayValue, engi
118123
ops.AsTypeOp(to_type=bigframes.dtypes.STRING_DTYPE),
119124
excluded_cols=["float64_col"],
120125
)
126+
121127
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
122128

123129

@@ -128,6 +134,7 @@ def test_engines_astype_numeric(scalars_array_value: array_value.ArrayValue, eng
128134
ops.AsTypeOp(to_type=bigframes.dtypes.NUMERIC_DTYPE),
129135
excluded_cols=["string_col"],
130136
)
137+
131138
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
132139

133140

@@ -144,6 +151,7 @@ def test_engines_astype_string_numeric(
144151
for val in vals
145152
]
146153
)
154+
147155
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
148156

149157

@@ -154,6 +162,7 @@ def test_engines_astype_date(scalars_array_value: array_value.ArrayValue, engine
154162
ops.AsTypeOp(to_type=bigframes.dtypes.DATE_DTYPE),
155163
excluded_cols=["string_col"],
156164
)
165+
157166
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
158167

159168

@@ -170,6 +179,7 @@ def test_engines_astype_string_date(
170179
for val in vals
171180
]
172181
)
182+
173183
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
174184

175185

@@ -180,6 +190,7 @@ def test_engines_astype_datetime(scalars_array_value: array_value.ArrayValue, en
180190
ops.AsTypeOp(to_type=bigframes.dtypes.DATETIME_DTYPE),
181191
excluded_cols=["string_col"],
182192
)
193+
183194
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
184195

185196

@@ -196,6 +207,7 @@ def test_engines_astype_string_datetime(
196207
for val in vals
197208
]
198209
)
210+
199211
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
200212

201213

@@ -206,6 +218,7 @@ def test_engines_astype_timestamp(scalars_array_value: array_value.ArrayValue, e
206218
ops.AsTypeOp(to_type=bigframes.dtypes.TIMESTAMP_DTYPE),
207219
excluded_cols=["string_col"],
208220
)
221+
209222
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
210223

211224

@@ -226,6 +239,7 @@ def test_engines_astype_string_timestamp(
226239
for val in vals
227240
]
228241
)
242+
229243
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
230244

231245

@@ -236,6 +250,7 @@ def test_engines_astype_time(scalars_array_value: array_value.ArrayValue, engine
236250
ops.AsTypeOp(to_type=bigframes.dtypes.TIME_DTYPE),
237251
excluded_cols=["string_col", "int64_col", "int64_too"],
238252
)
253+
239254
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
240255

241256

@@ -256,6 +271,7 @@ def test_engines_astype_from_json(scalars_array_value: array_value.ArrayValue, e
256271
),
257272
]
258273
arr, _ = scalars_array_value.compute_values(exprs)
274+
259275
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
260276

261277

@@ -265,6 +281,7 @@ def test_engines_astype_timedelta(scalars_array_value: array_value.ArrayValue, e
265281
scalars_array_value,
266282
ops.AsTypeOp(to_type=bigframes.dtypes.TIMEDELTA_DTYPE),
267283
)
284+
268285
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
269286

270287

@@ -279,6 +296,7 @@ def test_engines_where_op(scalars_array_value: array_value.ArrayValue, engine):
279296
)
280297
]
281298
)
299+
282300
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
283301

284302

@@ -292,6 +310,7 @@ def test_engines_coalesce_op(scalars_array_value: array_value.ArrayValue, engine
292310
)
293311
]
294312
)
313+
295314
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
296315

297316

@@ -305,6 +324,7 @@ def test_engines_fillna_op(scalars_array_value: array_value.ArrayValue, engine):
305324
)
306325
]
307326
)
327+
308328
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
309329

310330

@@ -320,6 +340,7 @@ def test_engines_casewhen_op_single_case(
320340
)
321341
]
322342
)
343+
323344
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
324345

325346

@@ -337,6 +358,7 @@ def test_engines_casewhen_op_double_case(
337358
)
338359
]
339360
)
361+
340362
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
341363

342364

@@ -345,6 +367,7 @@ def test_engines_isnull_op(scalars_array_value: array_value.ArrayValue, engine):
345367
arr, _ = scalars_array_value.compute_values(
346368
[ops.isnull_op.as_expr(expression.deref("string_col"))]
347369
)
370+
348371
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
349372

350373

@@ -353,6 +376,7 @@ def test_engines_notnull_op(scalars_array_value: array_value.ArrayValue, engine)
353376
arr, _ = scalars_array_value.compute_values(
354377
[ops.notnull_op.as_expr(expression.deref("string_col"))]
355378
)
379+
356380
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)
357381

358382

@@ -364,4 +388,5 @@ def test_engines_invert_op(scalars_array_value: array_value.ArrayValue, engine):
364388
ops.invert_op.as_expr(expression.deref("bool_col")),
365389
]
366390
)
391+
367392
assert_equivalence_execution(arr.node, REFERENCE_ENGINE, engine)

0 commit comments

Comments
 (0)