kayak / pypika

PyPika is a python SQL query builder that exposes the full richness of the SQL language using a syntax that reflects the resulting query. PyPika excels at all sorts of SQL queries but is especially useful for data analysis.
http://pypika.readthedocs.io/en/latest/
Apache License 2.0
2.43k stars 293 forks source link

Vertica alias use fix #734

Closed Ga68 closed 9 months ago

Ga68 commented 12 months ago

Vertica requires no aliases in the GROUP BY and ORDER BY clauses. The current implementation does not do that.

AzisK commented 10 months ago

Could you point me to the documentation and also add a test for this feature? Thank you for your work

Ga68 commented 9 months ago

I'm glad you asked about the documentation. Turns out I was wrong about this one. I can't remember at this point what made me think it was needed, but checking here

https://docs.vertica.com/12.0.x/en/sql-reference/statements/select/#parameters

it says

You can optionally assign a temporary alias to each column expression and reference that alias elsewhere in the SELECT statement—for example, in the query predicate or ORDER BY clause

Going to close this one as it seems un-needed.