@@ -655,11 +655,9 @@ def test_managed_function_df_apply_axis_1(session, dataset_id, scalars_dfs):
655655 try :
656656
657657 def serialize_row (row ):
658- # Explicitly casting types ensures consistent behavior between
659- # BigFrames and pandas. Without it, BigFrames return plain Python
660- # types, e.g. 0, while pandas return NumPy types, e.g. np.int64(0),
661- # which could lead to mismatches and requires further investigation.
662- # See b/435021126.
658+ # TODO(b/435021126): Remove explicit type conversion of the field
659+ # "name" after the issue has been addressed. It is added only to
660+ # accept partial pandas parity for the time being.
663661 custom = {
664662 "name" : int (row .name ),
665663 "index" : [idx for idx in row .index ],
@@ -705,7 +703,7 @@ def serialize_row(row):
705703 finally :
706704 # clean up the gcp assets created for the managed function.
707705 cleanup_function_assets (
708- serialize_row_mf , session .bqclient , session . cloudfunctionsclient
706+ serialize_row_mf , session .bqclient , ignore_failures = False
709707 )
710708
711709
@@ -716,11 +714,9 @@ def test_managed_function_df_apply_axis_1_aggregates(session, dataset_id, scalar
716714 try :
717715
718716 def analyze (row ):
719- # Explicitly casting types ensures consistent behavior between
720- # BigFrames and pandas. Without it, BigFrames return plain Python
721- # types, e.g. 0, while pandas return NumPy types, e.g. np.int64(0),
722- # which could lead to mismatches and requires further investigation.
723- # See b/435021126.
717+ # TODO(b/435021126): Remove explicit type conversion of the field
718+ # "name" after the issue has been addressed. It is added only to
719+ # accept partial pandas parity for the time being.
724720 return str (
725721 {
726722 "dtype" : row .dtype ,
@@ -735,7 +731,7 @@ def analyze(row):
735731
736732 with pytest .warns (
737733 bfe .PreviewWarning ,
738- match = ("Numpy version may not precisely match your local environment ." ),
734+ match = ("Numpy, Pandas, and Pyarrow version may not precisely match." ),
739735 ):
740736
741737 analyze_mf = session .udf (
@@ -756,9 +752,7 @@ def analyze(row):
756752
757753 finally :
758754 # clean up the gcp assets created for the managed function.
759- cleanup_function_assets (
760- analyze_mf , session .bqclient , session .cloudfunctionsclient
761- )
755+ cleanup_function_assets (analyze_mf , session .bqclient , ignore_failures = False )
762756
763757
764758@pytest .mark .parametrize (
@@ -834,11 +828,9 @@ def test_managed_function_df_apply_axis_1_complex(session, dataset_id, pd_df):
834828 try :
835829
836830 def serialize_row (row ):
837- # Explicitly casting types ensures consistent behavior between
838- # BigFrames and pandas. Without it, BigFrames return plain Python
839- # types, e.g. 0, while pandas return NumPy types, e.g. np.int64(0),
840- # which could lead to mismatches and requires further investigation.
841- # See b/435021126.
831+ # TODO(b/435021126): Remove explicit type conversion of the field
832+ # "name" after the issue has been addressed. It is added only to
833+ # accept partial pandas parity for the time being.
842834 custom = {
843835 "name" : int (row .name ),
844836 "index" : [idx for idx in row .index ],
@@ -876,7 +868,7 @@ def serialize_row(row):
876868 finally :
877869 # clean up the gcp assets created for the managed function.
878870 cleanup_function_assets (
879- serialize_row_mf , session .bqclient , session . cloudfunctionsclient
871+ serialize_row_mf , session .bqclient , ignore_failures = False
880872 )
881873
882874
@@ -942,5 +934,5 @@ def float_parser(row):
942934 finally :
943935 # clean up the gcp assets created for the managed function.
944936 cleanup_function_assets (
945- float_parser_mf , session .bqclient , session . cloudfunctionsclient
937+ float_parser_mf , session .bqclient , ignore_failures = False
946938 )
0 commit comments