Solving Why Not Questions for Aggregate Constraints Through Query Repair
Shatha Algarni, Boris Glavic, Seokki Lee, Adriane P. Chapman · 2024
Many real world problems require the result of a query to fulfill domain specific constraints, e.g., at least a certain fraction of applicants selected for an interview based on their qualifications should be female. In this work, we envision a framework that allows such requirements to be expressed as constraints on the result of a query that combine aggregation results through arithmetic expressions. When a user's query violates a constraint, then our framework repairs the query to satisfy the constraint. While our approach is related to prior work on query-based explanations for missing answers and enforcement of fairness constraints for query results, it supports more expressive constraints and is applicable to use cases other than fairness. We demonstrate the infeasibility of a brute force solution and discuss directions for future work to improve the performance of generating query repairs.