@@ -109,9 +109,11 @@ def test_remote_function_multiply_with_ibis(
109
109
try :
110
110
111
111
@session .remote_function (
112
- input_types = [int , int ],
113
- output_type = int ,
114
- dataset = dataset_id ,
112
+ # Make sure that the input/output types can be used positionally.
113
+ # This avoids the worst of the breaking change from 1.x to 2.x.
114
+ [int , int ],
115
+ int ,
116
+ dataset_id ,
115
117
bigquery_connection = bq_cf_connection ,
116
118
reuse = False ,
117
119
cloud_function_service_account = "default" ,
@@ -164,9 +166,11 @@ def test_remote_function_stringify_with_ibis(
164
166
try :
165
167
166
168
@session .remote_function (
167
- input_types = [int ],
168
- output_type = str ,
169
- dataset = dataset_id ,
169
+ # Make sure that the input/output types can be used positionally.
170
+ # This avoids the worst of the breaking change from 1.x to 2.x.
171
+ [int ],
172
+ str ,
173
+ dataset_id ,
170
174
bigquery_connection = bq_cf_connection ,
171
175
reuse = False ,
172
176
cloud_function_service_account = "default" ,
@@ -213,9 +217,11 @@ def func(x, y):
213
217
return x * abs (y % 4 )
214
218
215
219
remote_func = session .remote_function (
216
- input_types = [str , int ],
217
- output_type = str ,
218
- dataset = dataset_id ,
220
+ # Make sure that the input/output types can be used positionally.
221
+ # This avoids the worst of the breaking change from 1.x to 2.x.
222
+ [str , int ],
223
+ str ,
224
+ dataset_id ,
219
225
bigquery_connection = bq_cf_connection ,
220
226
reuse = False ,
221
227
cloud_function_service_account = "default" ,
@@ -251,9 +257,11 @@ def func(x, y):
251
257
return [len (x ), abs (y % 4 )]
252
258
253
259
remote_func = session .remote_function (
254
- input_types = [str , int ],
255
- output_type = list [int ],
256
- dataset = dataset_id ,
260
+ # Make sure that the input/output types can be used positionally.
261
+ # This avoids the worst of the breaking change from 1.x to 2.x.
262
+ [str , int ],
263
+ list [int ],
264
+ dataset_id ,
257
265
bigquery_connection = bq_cf_connection ,
258
266
reuse = False ,
259
267
cloud_function_service_account = "default" ,
@@ -286,9 +294,11 @@ def test_remote_function_decorator_with_bigframes_series(
286
294
try :
287
295
288
296
@session .remote_function (
289
- input_types = [int ],
290
- output_type = int ,
291
- dataset = dataset_id ,
297
+ # Make sure that the input/output types can be used positionally.
298
+ # This avoids the worst of the breaking change from 1.x to 2.x.
299
+ [int ],
300
+ int ,
301
+ dataset_id ,
292
302
bigquery_connection = bq_cf_connection ,
293
303
reuse = False ,
294
304
cloud_function_service_account = "default" ,
@@ -333,9 +343,11 @@ def add_one(x):
333
343
return x + 1
334
344
335
345
remote_add_one = session .remote_function (
336
- input_types = [int ],
337
- output_type = int ,
338
- dataset = dataset_id ,
346
+ # Make sure that the input/output types can be used positionally.
347
+ # This avoids the worst of the breaking change from 1.x to 2.x.
348
+ [int ],
349
+ int ,
350
+ dataset_id ,
339
351
bigquery_connection = bq_cf_connection ,
340
352
reuse = False ,
341
353
cloud_function_service_account = "default" ,
@@ -385,8 +397,10 @@ def add_one(x):
385
397
return x + 1
386
398
387
399
remote_add_one = session .remote_function (
388
- input_types = input_types ,
389
- output_type = int ,
400
+ # Make sure that the input/output types can be used positionally.
401
+ # This avoids the worst of the breaking change from 1.x to 2.x.
402
+ input_types ,
403
+ int ,
390
404
reuse = False ,
391
405
cloud_function_service_account = "default" ,
392
406
)(add_one )
@@ -415,8 +429,10 @@ def test_remote_function_explicit_dataset_not_created(
415
429
try :
416
430
417
431
@session .remote_function (
418
- input_types = [int ],
419
- output_type = int ,
432
+ # Make sure that the input/output types can be used positionally.
433
+ # This avoids the worst of the breaking change from 1.x to 2.x.
434
+ [int ],
435
+ int ,
420
436
dataset = dataset_id_not_created ,
421
437
bigquery_connection = bq_cf_connection ,
422
438
reuse = False ,
@@ -469,9 +485,11 @@ def sign(num):
469
485
return NO_SIGN
470
486
471
487
remote_sign = session .remote_function (
472
- input_types = [int ],
473
- output_type = int ,
474
- dataset = dataset_id ,
488
+ # Make sure that the input/output types can be used positionally.
489
+ # This avoids the worst of the breaking change from 1.x to 2.x.
490
+ [int ],
491
+ int ,
492
+ dataset_id ,
475
493
bigquery_connection = bq_cf_connection ,
476
494
reuse = False ,
477
495
cloud_function_service_account = "default" ,
@@ -517,9 +535,11 @@ def circumference(radius):
517
535
return 2 * mymath .pi * radius
518
536
519
537
remote_circumference = session .remote_function (
520
- input_types = [float ],
521
- output_type = float ,
522
- dataset = dataset_id ,
538
+ # Make sure that the input/output types can be used positionally.
539
+ # This avoids the worst of the breaking change from 1.x to 2.x.
540
+ [float ],
541
+ float ,
542
+ dataset_id ,
523
543
bigquery_connection = bq_cf_connection ,
524
544
reuse = False ,
525
545
cloud_function_service_account = "default" ,
0 commit comments