@@ -77,26 +77,26 @@ _merge_input_and_tables (input_table : Table) (tables_for_rows : Vector Read_Man
77
77
78
78
multiplicated_inputs = duplicate_rows input_table counts
79
79
Runtime.assert (unified_data.row_count == multiplicated_inputs.row_count)
80
- Runtime.assert (unified_metadata.is_nothing || (unified_metadata.row_count == unified_data.row_count))
80
+ Runtime.assert ((Nothing == unified_metadata) || (unified_metadata.row_count == unified_data.row_count))
81
81
82
- first_pass = if unified_metadata.is_nothing then multiplicated_inputs else
82
+ first_pass = if Nothing == unified_metadata then multiplicated_inputs else
83
83
multiplicated_inputs.zip unified_metadata right_prefix=""
84
84
first_pass.zip unified_data right_prefix=""
85
85
86
86
## Unifies provided metadata tables, knowing that some tables may have no
87
87
metadata - in such case we want to insert as many Nothing rows for metadata
88
88
as there are rows in the corresponding data table.
89
89
_unify_metadata (tables : Vector Read_Many_As_Table_Result) (on_problems : Problem_Behavior) -> Table | Nothing =
90
- has_no_metadata = tables.all r-> r.metadata.is_nothing
90
+ has_no_metadata = tables.all r-> Nothing == r.metadata
91
91
if has_no_metadata then Nothing else
92
92
unique = Column_Naming_Helper.in_memory.create_unique_name_strategy
93
93
tables.each r->
94
- if r.metadata.is_nothing.not then unique.mark_used r.metadata.column_names
94
+ if Nothing != r.metadata then unique.mark_used r.metadata.column_names
95
95
96
96
# 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.
97
97
dummy_column_name = unique.make_unique "_Internal_Placeholder_Column_"
98
98
tables_for_union = tables.map r->
99
- if r.metadata.is_nothing.not then r.metadata else
99
+ if Nothing != r.metadata then r.metadata else
100
100
Table.new [Column.from_repeated_item dummy_column_name Nothing r.data.row_count]
101
101
102
102
# Metadata are always merged by-name and columns that appear only in some tables are kept.
0 commit comments