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

Ruben Q L edited comment on CALCITE-5865 at 7/21/23 9:22 AM:
-------------------------------------------------------------

Thanks for the info [~nobigo]. I have created a PR to fix this issue: 
https://github.com/apache/calcite/pull/3332
I'll merge it as soon as the CI checks pass in order to resume the release 
process.


was (Author: rubenql):
Thanks for the indo [~nobigo]. I have created a PR to fix this issue: 
https://github.com/apache/calcite/pull/3332
I'll merge it as soon as the CI checks pass in order to resume the release 
process.

> ClassCastException with FLOOR and CEIL on conformances that are not builtin
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-5865
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5865
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Gian Merlino
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 1.35.0
>
>
> CALCITE-5747 introduced some BigQuery-specific logic for FLOOR and CEIL that 
> is keyed off the conformance being {{SqlConformanceEnum.BIG_QUERY}}. However, 
> it was implemented in such a way that implementations of {{SqlConformance}} 
> that are not {{SqlConformanceEnum}} would throw {{ClassCastException}}, due 
> to this line in {{Parser.jj}}:
> {code}
> SqlOperator op = SqlStdOperatorTable.floorCeil(floorFlag, 
> (SqlConformanceEnum) this.conformance);
> {code}
> Better would be to pass {{this.conformance}} without casting, and adjust 
> {{SqlStdOperatorTable.floorCeil}} to handle any kind of conformance.
> This affects us in Apache Druid land, because we have a conformance that 
> extends {{SqlAbstractConformance}}.



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

Reply via email to