Skip to content

Commit

Permalink
allow change of transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo committed Jan 31, 2024
1 parent 2c76d08 commit 987282b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rdt/hyper_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def _update_multi_column_config(self, column_name_to_transformer):
# Update the multi column fields
multi_columns_to_transformer = {}
for old_multi_column, new_multi_column in updated_mutli_column_fields.items():
if old_multi_column in self.field_transformers:
if old_multi_column in self.field_transformers and old_multi_column not in column_name_to_transformer:
transformer = self.field_transformers[old_multi_column]
else:
transformer = column_name_to_transformer.get(new_multi_column)
Expand Down Expand Up @@ -229,6 +229,7 @@ def _update_multi_column_transformers(self, column_name_to_transformer):
for columns, transformer in column_name_to_transformer.items():
if isinstance(columns, tuple):
self.field_transformers[columns] = transformer

elif columns in self._multi_column_fields:
old_multi_column = self._multi_column_fields[columns]
old_transformer = self.field_transformers.get(old_multi_column)
Expand Down

0 comments on commit 987282b

Please sign in to comment.