Skip to content

Commit ad09f59

Browse files
committed
workaround for #12185 - stop using is_nothing
1 parent 6d2158f commit ad09f59

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

distribution/lib/Standard/Table/0.0.0-dev/src/Internal/Read_Many_Helpers.enso

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,26 +77,26 @@ _merge_input_and_tables (input_table : Table) (tables_for_rows : Vector Read_Man
7777

7878
multiplicated_inputs = duplicate_rows input_table counts
7979
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))
8181

82-
first_pass = if unified_metadata.is_nothing then multiplicated_inputs else
82+
first_pass = if Nothing == unified_metadata then multiplicated_inputs else
8383
multiplicated_inputs.zip unified_metadata right_prefix=""
8484
first_pass.zip unified_data right_prefix=""
8585

8686
## Unifies provided metadata tables, knowing that some tables may have no
8787
metadata - in such case we want to insert as many Nothing rows for metadata
8888
as there are rows in the corresponding data table.
8989
_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
9191
if has_no_metadata then Nothing else
9292
unique = Column_Naming_Helper.in_memory.create_unique_name_strategy
9393
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
9595

9696
# 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.
9797
dummy_column_name = unique.make_unique "_Internal_Placeholder_Column_"
9898
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
100100
Table.new [Column.from_repeated_item dummy_column_name Nothing r.data.row_count]
101101

102102
# Metadata are always merged by-name and columns that appear only in some tables are kept.

0 commit comments

Comments
 (0)