diff --git a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Read_Many_Helpers.enso b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Read_Many_Helpers.enso index e665033bb56b..3a39274f1159 100644 --- a/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Read_Many_Helpers.enso +++ b/distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Read_Many_Helpers.enso @@ -77,9 +77,9 @@ _merge_input_and_tables (input_table : Table) (tables_for_rows : Vector Read_Man multiplicated_inputs = duplicate_rows input_table counts Runtime.assert (unified_data.row_count == multiplicated_inputs.row_count) - Runtime.assert (unified_metadata.is_nothing || (unified_metadata.row_count == unified_data.row_count)) + Runtime.assert ((Nothing == unified_metadata) || (unified_metadata.row_count == unified_data.row_count)) - first_pass = if unified_metadata.is_nothing then multiplicated_inputs else + first_pass = if Nothing == unified_metadata then multiplicated_inputs else multiplicated_inputs.zip unified_metadata right_prefix="" first_pass.zip unified_data right_prefix="" @@ -87,16 +87,16 @@ _merge_input_and_tables (input_table : Table) (tables_for_rows : Vector Read_Man metadata - in such case we want to insert as many Nothing rows for metadata as there are rows in the corresponding data table. _unify_metadata (tables : Vector Read_Many_As_Table_Result) (on_problems : Problem_Behavior) -> Table | Nothing = - has_no_metadata = tables.all r-> r.metadata.is_nothing + has_no_metadata = tables.all r-> Nothing == r.metadata if has_no_metadata then Nothing else unique = Column_Naming_Helper.in_memory.create_unique_name_strategy tables.each r-> - if r.metadata.is_nothing.not then unique.mark_used r.metadata.column_names + if Nothing != r.metadata then unique.mark_used r.metadata.column_names # A dummy column because we cannot create a table with 0 columns, it will be removed after union. We find an unique name for it to avoid conflicts. dummy_column_name = unique.make_unique "_Internal_Placeholder_Column_" tables_for_union = tables.map r-> - if r.metadata.is_nothing.not then r.metadata else + if Nothing != r.metadata then r.metadata else Table.new [Column.from_repeated_item dummy_column_name Nothing r.data.row_count] # Metadata are always merged by-name and columns that appear only in some tables are kept.