From 3ba4bfa6dc44baac5fd3286b65db12ddc3333af7 Mon Sep 17 00:00:00 2001 From: Felipe Date: Mon, 24 Jul 2023 10:17:36 -0700 Subject: [PATCH] Add comment --- sdv/data_processing/data_processor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdv/data_processing/data_processor.py b/sdv/data_processing/data_processor.py index 39bebf359..1c0f8de3b 100644 --- a/sdv/data_processing/data_processor.py +++ b/sdv/data_processing/data_processor.py @@ -718,13 +718,15 @@ def reverse_transform(self, data, reset_keys=False): sampled_columns.extend(self._keys) for constraint in reversed(self._constraints_to_reverse): + sampled_columns = constraint.reverse_transform(sampled_columns) reversed_data = constraint.reverse_transform(reversed_data) # Add new columns generated by the constraint new_columns = list(set(reversed_data.columns) - set(sampled_columns)) sampled_columns.extend(new_columns) - # Sort the sampled columns in the order of the metadata + # Sort the sampled columns in the order of the metadata. + # Any extra columns not present in the metadata will be dropped. # In multitable there may be missing columns in the sample such as foreign keys # And alternate keys. Thats the reason of ensuring that the metadata column is within # The sampled columns.