@@ -72,16 +72,13 @@ def test_feature_group_pandas_mixed_infer_schema(self):
7272
7373 entity = self .create_entity_resource (fs )
7474 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'>"
8582 self .clean_up_entity (entity )
8683 self .clean_up_feature_store (fs )
8784
@@ -92,14 +89,15 @@ def test_feature_group_pandas_mixed_infer_schema_nan(self):
9289
9390 entity = self .create_entity_resource (fs )
9491 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
10299
100+ self .clean_up_feature_group (feature_group )
103101 self .clean_up_entity (entity )
104102 self .clean_up_feature_store (fs )
105103
0 commit comments