Constant expressions of an ExpressionWrapper object are incorrectly placed at the GROUP BY clause Description
Constant expressions of an ExpressionWrapper object are incorrectly placed at the GROUP BY clause Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). I have a function that expects an arbitrary Query expression and constructs a query on a Postgres db def execQuery(expr): expr =…
The task
I have a function that expects an arbitrary Query expression and constructs a query on a Postgres db def execQuery(expr): expr = ExpressionWrapper(expr, output_field=IntegerField()) return Model.objects.annotate(expr_res=expr).values('expr_res', 'column_a').annotate(sum=Sum('column_b')) However, when the given expr…
Part of Lego-X/Lego-RL-SWE-Bench-Verified.