You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2025/05/22 12:32:00 UTC
[jira] [Comment Edited] (CALCITE-7035) SQL calls without an implementor or convertLet (NULLIF, YEAR, ...)throw an error when having a subquery as parameter
[ https://issues.apache.org/jira/browse/CALCITE-7035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17953421#comment-17953421 ]
Alessandro Solimando edited comment on CALCITE-7035 at 5/22/25 12:31 PM:
-------------------------------------------------------------------------
So this is a regression, right? Let me bring it up in the discussion for 1.40.0 release, as it might end up being a blocker. Thanks for reporting this ahead of the first RC, [~alex_pl], much appreciated!
It would be great if [~mbudiu] could take a look as author of the change.
was (Author: asolimando):
So this is a regression, right? Let me bring it up in the discussion for 1.40.0 release, as it might end up being a blocker. Thanks for reporting this ahead of the first RC, [~alex_pl], much appreciated!
> SQL calls without an implementor or convertLet (NULLIF, YEAR, ...)throw an error when having a subquery as parameter
> --------------------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-7035
> URL: https://issues.apache.org/jira/browse/CALCITE-7035
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.40.0
> Reporter: Aleksey Plekhanov
> Priority: Major
>
> After CALCITE-6978 {{SqlCall}}'s with subqueries are not rewritten during validation even when {{withCallRewrite(true)}} property is set in the configuration.
> Functions like {{NULLIF}}, {{YEAR}}, {{MONTH}}, etc don't have implementor or convertlet, so, when used with subqueries, throw an error: Unable to implement.
> Examples of problematic queries:
> {noformat}
> select nullif((select max(emps.age) from emps), 0);
> select year(select max(joinedat) from emps);
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)