Please see the merges: https://gerrit.sqlalchemy.org/622 https://gerrit.sqlalchemy.org/621
which should resolve both of these. On Thu, Jan 4, 2018 at 10:37 AM, Mike Bayer <[email protected]> wrote: > On Thu, Jan 4, 2018 at 5:46 AM, Florian Apolloner <[email protected]> > wrote: >> Hi there, >> >> I am writing a custom dialect and sqlalchemy currently generates a statement >> like this: >> >> ``` >> SELECT count(some_table.id) AS count_1, some_table.x + some_table.y AS lx >> FROM some_table GROUP BY some_table.x + some_table.y ORDER BY lx >> ``` >> >> As you can see it uses the alias lx in ORDER BY but not in GROUP BY. Is >> there any way to tell it to use the alias in GROUP BY instead of the raw >> expression (my database doesn't seem to support those expressions in group >> by)? >> The test I am currently running against is test_group_by_composed from the >> sqlalchemy test suite. > > OK the answer for now is to disable this test, and I will add a > requirements rule so that people stop hitting this, as the identical > situation occurred in october: > > https://groups.google.com/forum/#!searchin/sqlalchemy/group$20by$20dialect|sort:date/sqlalchemy/r4X7ddN4rgA/c4HMI2qhBAAJ > > you can also see background in that thread for how to actually get the > "GROUP BY ix" syntax if you wanted to do so (though not in that test). > >> >> Also I needed to add: >> ``` >> @property # WTF >> def broken_cx_oracle6_numerics(self): >> return exclusions.closed() >> ``` >> and others to the requirements of my dialect to get the testsuite running at >> all. Shouldn't sqlalchemy ship with sane default requirements (I mainly >> followed >> https://github.com/zzzeek/sqlalchemy/blob/master/README.dialects.rst )? > > that's also a bug, that rule should have been removed before the 1.2 > release as it should no longer be necessary. > >> >> Thanks and best regards, >> Florian >> >> -- >> SQLAlchemy - >> The Python SQL Toolkit and Object Relational Mapper >> >> http://www.sqlalchemy.org/ >> >> To post example code, please provide an MCVE: Minimal, Complete, and >> Verifiable Example. See http://stackoverflow.com/help/mcve for a full >> description. >> --- >> You received this message because you are subscribed to the Google Groups >> "sqlalchemy" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/sqlalchemy. >> For more options, visit https://groups.google.com/d/optout. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
