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

xiong duan commented on CALCITE-6431:
-------------------------------------

Maybe Spark or Hive can optimize CASE WHEN:
CASE COUNT(*) WHEN 0 THEN NULL WHEN 1 THEN MIN(`product_class_id`) ELSE (SELECT 
NULLĀ  UNION ALLĀ  SELECT NULL)
don't evaluate the subquery value first.

> Implement the SINGLE_VALUE aggregation in HiveSqlDialect And SparkSQLDialect
> ----------------------------------------------------------------------------
>
>                 Key: CALCITE-6431
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6431
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.37.0
>            Reporter: xiong duan
>            Assignee: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.38.0
>
>
> When we use the SQL including the scalar query, converting this SQL Rel to 
> HiveSQL will include the SINGLE_VALUE aggregation function(HiveSQL can't 
> handle it) in the dialect SQL.



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

Reply via email to