can't print a select statement that contains aggregate_order_by

Issue #4079 closed
Darin Gordon created an issue

during debugging, I tried to print a select statement that is using the aggregate_order_by function (postgresql), but that raises a rendering exception:

sqlalchemy.exc.UnsupportedCompilationError: Compiler <sqlalchemy.sql.compiler.StrSQLCompiler object at 0x7fec0069fda0> can't render element of type <class 'sqlalchemy.dialects.postgresql.ext.aggregate_order_by'>

This is happening in the context of a subquery containing a json_agg: func.json_agg(aggregate_order_by(my_subquery.c.item, my_subquery.c.columnX)).label('x')

Comments (5)

  1. Log in to comment