[ https://issues.apache.org/jira/browse/CALCITE-7328 ]


    Zhen Chen deleted comment on CALCITE-7328:
    ------------------------------------

was (Author: jensen):
I submit a [PR|https://github.com/apache/calcite/pull/4684] . If you have time, 
please take a look at whether this PR meets your needs.

> Support SCALAR_QUERY in RelMdExpressionLineage
> ----------------------------------------------
>
>                 Key: CALCITE-7328
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7328
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>
> The SQL1:
> {code:java}
> select 
> (select max(productid) from products_temporal) as maxValue, 
> (select min(productid) from products_temporal) as minValue {code}
> The ExpressionLineage of this SQL is NULL.
> The SQL2:
> {code:java}
> select 
> productid > (select max(productid) from products_temporal) as productidValues 
> from products_temporal {code}
> The ExpressionLineage of this SQL is :
> {code:java}
> [>([CATALOG, SALES, PRODUCTS_TEMPORAL].#0.$0, 
> $SCALAR_QUERY({\nLogicalAggregate(group=[{}], EXPR$0=[MAX($0)])\r\n  
> LogicalProject(PRODUCTID=[$0])\r\n    LogicalTableScan(table=[[CATALOG, 
> SALES, PRODUCTS_TEMPORAL]])\r\n}))]{code}
> There are two issues here:
>  # SQL1 should return result.
>  # Whether or not to unwrap the SCALAR_QUERY. For example in SQL2 like this:
> {code:java}
> [>([CATALOG, SALES, PRODUCTS_TEMPORAL].#0.$0,MAX[CATALOG, SALES, 
> PRODUCTS_TEMPORAL].#0.$0{code}



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

Reply via email to