diff --git a/howso/utilities/feature_attributes/relational.py b/howso/utilities/feature_attributes/relational.py index 4579487d..5b8a44d2 100644 --- a/howso/utilities/feature_attributes/relational.py +++ b/howso/utilities/feature_attributes/relational.py @@ -327,15 +327,15 @@ def _get_random_value(self, feature_name: str, no_nulls: bool = False) -> Option random_value = ( session.query(self.data.c[feature_name]) .filter(self.data.c[feature_name].is_not(None)) - .offset(idx) .order_by(feature_name) # 19234: using order_by here is necessary for MSSQL, - .first() # however, this should ultimately be re-written to - ) # avoid the performance pentalty this imposes. + .offset(idx) # however, this should ultimately be re-written to + .first() # avoid the performance pentalty this imposes. + ) else: random_value = ( session.query(self.data.c[feature_name]) - .offset(idx) .order_by(feature_name) # See above + .offset(idx) .first() )