Skip to content

Commit 614c50c

Browse files
TeddyCrkeshavmohta09
authored andcommitted
fix: early partitionning return in dl sampler (#25883)
1 parent b6deea9 commit 614c50c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ingestion/src/metadata/sampler/pandas/sampler.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,19 @@ def get_dataset(self, **__):
100100
Returns:
101101
List[DataFrame]
102102
"""
103+
raw_dataset = self.raw_dataset
103104
if self.sample_query:
104105
return self._rdn_sample_from_user_query()
105106

106107
if self.partition_details:
107-
return self._partitioned_table()
108+
raw_dataset = self._partitioned_table()
108109

109110
if not self.sample_config.profileSample or (
110111
self.sample_config.profileSample == 100
111112
and self.sample_config.profileSampleType == ProfileSampleType.PERCENTAGE
112113
):
113-
return self.raw_dataset
114-
return self.get_sampled_dataframe(self.raw_dataset, self.sample_config)
114+
return raw_dataset
115+
return self.get_sampled_dataframe(raw_dataset, self.sample_config)
115116

116117
def _fetch_rows(self, data_frame):
117118
return data_frame.dropna().values.tolist()

0 commit comments

Comments
 (0)