flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From walterddr <...@git.apache.org>
Subject [GitHub] flink pull request #5706: [FLINK-8903] [table] Fix VAR_SAMP, VAR_POP, STDDEV...
Date Tue, 20 Mar 2018 16:05:13 GMT
Github user walterddr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5706#discussion_r175825522
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/logical/FlinkLogicalWindowAggregate.scala
---
    @@ -103,6 +106,22 @@ class FlinkLogicalWindowAggregateConverter
         FlinkConventions.LOGICAL,
         "FlinkLogicalWindowAggregateConverter") {
     
    +  override def matches(call: RelOptRuleCall): Boolean = {
    +    val agg = call.rel(0).asInstanceOf[LogicalWindowAggregate]
    +
    +    // we do not support these functions natively
    +    // they have to be converted using the WindowAggregateReduceFunctionsRule
    +    val supported = agg.getAggCallList.asScala.map(_.getAggregation.getKind).forall {
    +      // we support AVG
    +      case SqlKind.AVG => true
    +      // but none of the other AVG agg functions
    +      case k if SqlKind.AVG_AGG_FUNCTIONS.contains(k) => false
    +      case _ => true
    +    }
    +
    +    !agg.containsDistinctCall() && supported
    --- End diff --
    
    Yes. This was kinda confusing to me, we should clean this up when adding DISTINCT support.
Thanks for the update @fhueske 


---

Mime
View raw message