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

ASF GitHub Bot commented on FLINK-7051:
---------------------------------------

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4873#discussion_r147096750
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/utils/AggSqlFunction.scala
 ---
    @@ -58,14 +62,17 @@ class AggSqlFunction(
         // will be generated when translating the calcite relnode to flink 
runtime execution plan
         null,
         false,
    -    requiresOver
    +    requiresOver,
    +    typeFactory
       ) {
     
       def getFunction: AggregateFunction[_, _] = aggregateFunction
     
       override def isDeterministic: Boolean = aggregateFunction.isDeterministic
     
       override def toString: String = displayName
    +
    +  override def getParamTypes: util.List[RelDataType] = 
Collections.emptyList()
    --- End diff --
    
    I checked the Calcite code. There is a method that accesses the first 
element of the list if it is not `null` (no length >= 1 check). Hence, an empty 
list would result in an exception. I'd rather return `null` here.


> Bump up Calcite version to 1.14
> -------------------------------
>
>                 Key: FLINK-7051
>                 URL: https://issues.apache.org/jira/browse/FLINK-7051
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Haohui Mai
>            Priority: Critical
>             Fix For: 1.4.0
>
>
> This is an umbrella issue for all tasks that need to be done once Apache 
> Calcite 1.14 is released.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to