Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80C8319EBD for ; Wed, 27 Apr 2016 16:35:13 +0000 (UTC) Received: (qmail 85873 invoked by uid 500); 27 Apr 2016 16:35:13 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 85775 invoked by uid 500); 27 Apr 2016 16:35:13 -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 85722 invoked by uid 99); 27 Apr 2016 16:35:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Apr 2016 16:35:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E62B62C1F64 for ; Wed, 27 Apr 2016 16:35:12 +0000 (UTC) Date: Wed, 27 Apr 2016 16:35:12 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-3754) Add a validation phase before construct RelNode using TableAPI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-3754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260438#comment-15260438 ] ASF GitHub Bot commented on FLINK-3754: --------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/1916#discussion_r61291621 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/TableEnvironment.scala --- @@ -355,4 +380,26 @@ object TableEnvironment { new ScalaStreamTableEnv(executionEnvironment, tableConfig) } + /** + * The primary workflow for executing plan validation for that generated from Table API. + * The validation is intentionally designed as a lazy procedure and triggered when we + * are going to run on Flink core. + */ + class PlanPreparation(val env: TableEnvironment, val logical: LogicalNode) { + + lazy val resolvedPlan: LogicalNode = env.getValidator.resolve(logical) + + def validate(): Unit = env.getValidator.validate(resolvedPlan) + + lazy val relNode: RelNode = { + env match { + case _: BatchTableEnvironment => --- End diff -- Why do you distinguish here? It's the same code, no? > Add a validation phase before construct RelNode using TableAPI > -------------------------------------------------------------- > > Key: FLINK-3754 > URL: https://issues.apache.org/jira/browse/FLINK-3754 > Project: Flink > Issue Type: Improvement > Components: Table API > Affects Versions: 1.0.0 > Reporter: Yijie Shen > Assignee: Yijie Shen > > Unlike sql string's execution, which have a separate validation phase before RelNode construction, Table API lacks the counterparts and the validation is scattered in many places. > I suggest to add a single validation phase and detect problems as early as possible. -- This message was sent by Atlassian JIRA (v6.3.4#6332)