You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PostgreSQL specific DISTINCT ON clause is not supported by queryparser.
minimal example
example:
fromqueryparser.postgresqlimportPostgreSQLQueryProcessorqp=PostgreSQLQueryProcessor()
sql="""SELECT DISTINCT ON ("source"."tycho2_id") "tycho2_id", "source"."tycho2_dist", "source"."source_id", "source"."raj2000" FROM "applause_dr3"."source_calib" AS "source" WHERE "source"."raj2000" BETWEEN 10.0 AND 10.0005 AND "source"."tycho2_dist" IS NOT NULL ORDER BY "source"."tycho2_dist""""qp.set_query(sql)
qp.process_query()
I've implemented your suggestion into the new branch https://github.com/kimakan/queryparser/tree/feature-add-distinct
and added your example as a test to /src/queryparser/testing/tests.yaml.
All previous tests and the new tests run without any issues.
Probably, we should think about the cases we want to cover and add tests for it.
Issue
The PostgreSQL specific DISTINCT ON clause is not supported by queryparser.
minimal example
example:
fails with following error message
Expectations
I expect that DISTINCT ON clause passes without raising an exception.
Patch suggestion
This patch seems to solve the issue. But may not be appropriate for all cases.
The text was updated successfully, but these errors were encountered: