You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by stefanobortoli <gi...@git.apache.org> on 2017/07/03 13:40:40 UTC

[GitHub] flink pull request #3783: [FLINK-6388] Add support for DISTINCT into Code Ge...

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

    https://github.com/apache/flink/pull/3783#discussion_r125291702
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/CodeGenerator.scala ---
    @@ -296,6 +299,39 @@ class CodeGenerator(
           fields.mkString(", ")
         }
     
    +    def genInitialize(): String = {
    +      
    +      val sig: String = 
    +        j"""
    +           |  public void initialize(
    +           |    org.apache.flink.api.common.functions.RuntimeContext ctx
    +           |  )""".stripMargin
    +        
    +      val initDist: String = if( distinctAggsFlags.isDefined ) {
    +        val statePackage = "org.apache.flink.api.common.state"
    +        val distAggsFlags = distinctAggsFlags.get
    +          for(i <- distAggsFlags.indices) yield
    +            if(distAggsFlags(i)) {
    +              val typeString = javaTypes(aggFields(i)(0))
    --- End diff --
    
    sounds good


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---