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

Mihai Budiu resolved CALCITE-7774.
----------------------------------
    Fix Version/s: 1.43.0
       Resolution: Fixed

Fixed in 
[https://github.com/apache/calcite/commit/55d2e3b72f6ec828d27f0c4f5792948d924be501]

Thank you for the report and fix [~jhaltom] 

> JDBC adapter generates a GROUP BY with a constant key, which SQL Server 
> rejects
> -------------------------------------------------------------------------------
>
>                 Key: CALCITE-7774
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7774
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Jerome Isaac Haltom
>            Assignee: Jerome Isaac Haltom
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> SQL Server doesn't allow a constant as a GROUP BY key, and the JDBC adapter 
> sends one anyway.
> {code:sql}
> select count(*) from "EMPS" group by 'a'
> {code}
> comes out as
> {code:sql}
> SELECT COUNT(*) FROM [dbo].[EMPS] GROUP BY 'a'
> {code}
> and SQL Server 2019 answers:
> {code}
> Each GROUP BY expression must contain at least one column that is not an 
> outer reference.
> {code}



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

Reply via email to