[ 
https://issues.apache.org/jira/browse/CALCITE-7157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017765#comment-18017765
 ] 

Mihai Budiu commented on CALCITE-7157:
--------------------------------------

your solution rewrites the query already. Why not use that rule instead of 
inserting a new project?

> 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
>            Priority: Major
>              Labels: pull-request-available
>
> 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