diff --git a/test/test_suit/base_iceberg_test.py b/test/test_suit/base_iceberg_test.py index b9ab7dafc..6ff22bddf 100644 --- a/test/test_suit/base_iceberg_test.py +++ b/test/test_suit/base_iceberg_test.py @@ -36,7 +36,7 @@ def __init__(self, driver, name_salt: str, config_file_name: str): "null_object": {"key": "value"}, "empty_array": [1, 2, 3], "some_object": { - "null_key": None, + "null_key": "solnik", "string_key": "string_key", "another_string_key": "another_string_key", "inner_object": { @@ -308,7 +308,7 @@ def _verify_iceberg_content_for_schema_evolution_2(self, content: dict): assert_equals([1, 2, 3], content['null_array']) assert_equals('value', content['null_object']['key']) assert_equals([1, 2, 3], content['empty_array']) - assert_equals(None, content['some_object']['null_key']) + assert_equals("solnik", content['some_object']['null_key']) assert_equals('string_key', content['some_object']['string_key']) assert_equals('another_string_key', content['some_object']['another_string_key']) assert_equals(456, content['some_object']['inner_object']['inner_object_key']) diff --git a/test/test_suit/iceberg_schema_evolution_json_aws.py b/test/test_suit/iceberg_schema_evolution_json_aws.py index 82f46e18e..a3d81c14f 100644 --- a/test/test_suit/iceberg_schema_evolution_json_aws.py +++ b/test/test_suit/iceberg_schema_evolution_json_aws.py @@ -16,22 +16,23 @@ def setup(self): def send(self): self._send_json_values(self.test_message_from_docs, 100) - self._send_json_values(self.test_message_for_schema_evolution_1, 100) - # TODO SNOW-1731264 - # net.snowflake.ingest.utils.SFException: The given row cannot be converted to the internal format: Object of type java.util.LinkedHashMap cannot be ingested into Snowflake column NULL_OBJECT of type STRING, rowIndex:0. Allowed Java types: String, Number, boolean, char - # self._send_json_values(self.test_message_for_schema_evolution_2, 100) + # first 10 messages should be discarded due to lack of schema for null fields + self._send_json_values(self.test_message_for_schema_evolution_1, 10) + self._send_json_values(self.test_message_for_schema_evolution_2, 100) + # now with the schema coming from test_message_for_schema_evolution_2 we should be able to insert null values + self._send_json_values(self.test_message_for_schema_evolution_1, 10) def verify(self, round): - self._assert_number_of_records_in_table(200) + self._assert_number_of_records_in_table(210) actual_record_from_docs_dict = self._select_schematized_record_with_offset(1) self._verify_iceberg_content_from_docs(actual_record_from_docs_dict) - actual_record_for_schema_evolution_1 = self._select_schematized_record_with_offset(100) - self._verify_iceberg_content_for_schema_evolution_1(actual_record_for_schema_evolution_1) + actual_record_for_schema_evolution_2 = self._select_schematized_record_with_offset(100) + self._verify_iceberg_content_for_schema_evolution_2(actual_record_for_schema_evolution_2) - # TODO SNOW-1731264 - # actual_record_for_schema_evolution_2 = self._select_schematized_record_with_offset(200) + actual_record_for_schema_evolution_1 = self._select_schematized_record_with_offset(200) + self._verify_iceberg_content_for_schema_evolution_1(actual_record_for_schema_evolution_1)