@@ -72,16 +72,13 @@ def test_feature_group_pandas_mixed_infer_schema(self):
72
72
73
73
entity = self .create_entity_resource (fs )
74
74
assert entity .oci_fs_entity .id
75
-
76
- feature_group = self .define_feature_group_resource_with_pandas_mixed_infer_schema (
77
- entity .oci_fs_entity .id , fs .oci_fs .id
78
- )
79
- feature_group .create ()
80
- feature_group .materialise (self .pandas_mixed_df )
81
- df = feature_group .select ().read ()
82
- assert df
83
-
84
- self .clean_up_feature_group (feature_group )
75
+ try :
76
+ feature_group = self .define_feature_group_resource_with_pandas_mixed_infer_schema (
77
+ entity .oci_fs_entity .id , fs .oci_fs .id
78
+ )
79
+ except TypeError as e :
80
+ assert e .__str__ () == "field MixedColumn: Can not merge type <class 'pyspark.sql.types.StringType'> " \
81
+ "and <class 'pyspark.sql.types.LongType'>"
85
82
self .clean_up_entity (entity )
86
83
self .clean_up_feature_store (fs )
87
84
@@ -92,14 +89,15 @@ def test_feature_group_pandas_mixed_infer_schema_nan(self):
92
89
93
90
entity = self .create_entity_resource (fs )
94
91
assert entity .oci_fs_entity .id
95
- try :
96
- feature_group = self . define_feature_group_resource_with_pandas_mixed_infer_schema_nan (
97
- entity . oci_fs_entity . id , fs . oci_fs . id
98
- )
99
- except TypeError as e :
100
- assert e . __str__ () == "Can not merge type <class 'pyspark.sql.types.StringType'> and <class " \
101
- "'pyspark.sql.types.LongType'>"
92
+ feature_group = self . define_feature_group_resource_with_pandas_mixed_infer_schema_nan (
93
+ entity . oci_fs_entity . id , fs . oci_fs . id
94
+ )
95
+ feature_group . create ( )
96
+ feature_group . materialise ( self . pandas_mixed_df_nan )
97
+ df = feature_group . select (). read ()
98
+ assert df
102
99
100
+ self .clean_up_feature_group (feature_group )
103
101
self .clean_up_entity (entity )
104
102
self .clean_up_feature_store (fs )
105
103
0 commit comments