[
https://issues.apache.org/jira/browse/CALCITE-7035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksey Plekhanov updated CALCITE-7035:
---------------------------------------
Description:
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}
was:
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 queies:
{noformat}
select nullif((select max(emps.age) from emps), 0);
select year(select max(joinedat) from emps);
{noformat}
> Some SQL calls (NULLIF, YEAR, ...) with subquery as parameter throws an error
> -----------------------------------------------------------------------------
>
> 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)