in data_validation/data_validation.py [0:0]
def query_too_large(self, rows_df, grouped_fields):
"""Return bool to dictate if another level of recursion
would create a too large result set.
Rules to define too large are:
- If any grouped fields remain, return False.
(assumes user added logical sized groups)
- Else, if next group size is larger
than the limit, return True.
- Finally return False if no covered case occured.
"""
if len(grouped_fields) > 1:
return False
try:
count_df = rows_df[
rows_df[consts.AGGREGATION_TYPE] == consts.CONFIG_TYPE_COUNT
]
for row in count_df.to_dict(orient="row"):
recursive_query_size = max(
float(row[consts.SOURCE_AGG_VALUE]),
float(row[consts.TARGET_AGG_VALUE]),
)
if recursive_query_size > self.config_manager.max_recursive_query_size:
logging.warning("Query result is too large for recursion: %s", row)
return True
except Exception:
logging.warning("Recursive values could not be cast to float.")
return False
return False