Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 61DB8200D3E for ; Wed, 1 Nov 2017 14:35:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6082A160BE6; Wed, 1 Nov 2017 13:35:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AE045160BEA for ; Wed, 1 Nov 2017 14:35:12 +0100 (CET) Received: (qmail 952 invoked by uid 500); 1 Nov 2017 13:35:11 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 808 invoked by uid 99); 1 Nov 2017 13:35:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2017 13:35:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2EC771805C8 for ; Wed, 1 Nov 2017 13:35:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id pYYQfbndke1f for ; Wed, 1 Nov 2017 13:35:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A5E1E61103 for ; Wed, 1 Nov 2017 13:35:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 37735E06C7 for ; Wed, 1 Nov 2017 13:35:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C64CD212F9 for ; Wed, 1 Nov 2017 13:35:01 +0000 (UTC) Date: Wed, 1 Nov 2017 13:35:01 +0000 (UTC) From: "Kurt Young (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-7959) Split CodeGenerator into CodeGeneratorContext and ExprCodeGenerator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 01 Nov 2017 13:35:13 -0000 [ https://issues.apache.org/jira/browse/FLINK-7959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16234067#comment-16234067 ] Kurt Young commented on FLINK-7959: ----------------------------------- cc [~fhueske] [~twalthr] > Split CodeGenerator into CodeGeneratorContext and ExprCodeGenerator > ------------------------------------------------------------------- > > Key: FLINK-7959 > URL: https://issues.apache.org/jira/browse/FLINK-7959 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL > Reporter: Kurt Young > Assignee: Kurt Young > Priority: Major > > Right now {{CodeGenerator}} actually acts two roles, one is responsible for generating codes from RexNode, and the other one is keeping lots of reusable statements. It makes more sense to split these logic into two dedicated classes. > The new {{CodeGeneratorContext}} will keep all the reusable statements, while the new {{ExprCodeGenerator}} will only do generating codes from RexNode. > And for classes like {{AggregationCodeGenerator}} or {{FunctionCodeGenerator}}, I think the should not be the subclasses of the {{CodeGenerator}}, but should all as standalone classes. They can create {{ExprCodeGenerator}} when they need to generating codes from RexNode, and they can also generating codes by themselves. The {{CodeGeneratorContext}} can be passed around to collect all reusable statements, and list them in the final generated class. -- This message was sent by Atlassian JIRA (v6.4.14#64029)