[ 
https://issues.apache.org/jira/browse/CALCITE-7157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhen Chen resolved CALCITE-7157.
--------------------------------
    Fix Version/s: 1.41.0
         Assignee: Zhen Chen
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/03ce8f8683e8e4eb145f2961dd4072af2a805621
Thanks for the review [~mbudiu]

> PostgreSQL does not support string literal in ORDER BY clause
> -------------------------------------------------------------
>
>                 Key: CALCITE-7157
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7157
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.40.0
>            Reporter: Zhen Chen
>            Assignee: Zhen Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.41.0
>
>
> In RelToSqlConverterTest, the following test passes, but the expectedSql does 
> not work in PostgreSQL. PostgreSQL does not support string literal in ORDER 
> BY clause.
> {code:java}
> @Test void testOrderByConstants() {
>     final String query = ""
>         + "select \"employee_id\", 'abc' as c\n"
>         + "from \"foodmart\".\"employee\"\n"
>         + "order by c";
>     final String expectedSql = ""
>         + "SELECT \"employee_id\", 'abc' AS \"C\"\n"
>         + "FROM \"foodmart\".\"employee\"\n"
>         + "ORDER BY 'abc'";
>     sql(query).withPostgresql().ok(expectedSql);
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to