Commits

Mike Bayer committed 2570017

add anonymous labels to function calls

Comments (0)

Files changed (1)

lib/sqlalchemy/sql/compiler.py

             column.table is not None and \
             not isinstance(column.table, sql.Select):
             return column.label(column.name)
-        elif not isinstance(column, (sql._UnaryExpression, sql._TextClause)) and not hasattr(column, 'name'):
+        elif not isinstance(column, (sql._UnaryExpression, sql._TextClause)) and (not hasattr(column, 'name') or isinstance(column, sql._Function)):
             return column.label(None)
         else:
             return column