[GitHub] flink pull request #2949: [FLINK-5257] [table] display optimized logical pla...
Github user KurtYoung commented on a diff in the pull request: https://github.com/apache/flink/pull/2949#discussion_r91209202 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/BatchTableEnvironment.scala --- @@ -275,17 +278,27 @@ abstract class BatchTableEnvironment( * Table API calls and / or SQL queries and generating corresponding [[DataSet]] operators. * * @param table The root node of the relational expression tree. -* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. +* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. * @tparam A The type of the resulting [[DataSet]]. * @return The [[DataSet]] that corresponds to the translated [[Table]]. */ protected def translate[A](table: Table)(implicit tpe: TypeInformation[A]): DataSet[A] = { +val dataSetPlan = optimize(table.getRelNode) +translate(dataSetPlan) + } + /** +* Translates a logical [[RelNode]] into a [[DataSet]]. +* +* @param logicalPlan The root node of the relational expression tree. +* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. +* @tparam A The type of the resulting [[DataSet]]. +* @return The [[DataSet]] that corresponds to the translated [[Table]]. +*/ + protected def translate[A](logicalPlan: RelNode)(implicit tpe: TypeInformation[A]): DataSet[A] = { --- End diff -- Sorry for the inconvenience, I will pay attention to this kind of issues next time. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #2949: [FLINK-5257] [table] display optimized logical pla...
Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/2949 --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #2949: [FLINK-5257] [table] display optimized logical pla...
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/2949#discussion_r91049302 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/BatchTableEnvironment.scala --- @@ -275,17 +278,27 @@ abstract class BatchTableEnvironment( * Table API calls and / or SQL queries and generating corresponding [[DataSet]] operators. * * @param table The root node of the relational expression tree. -* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. +* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. * @tparam A The type of the resulting [[DataSet]]. * @return The [[DataSet]] that corresponds to the translated [[Table]]. */ protected def translate[A](table: Table)(implicit tpe: TypeInformation[A]): DataSet[A] = { +val dataSetPlan = optimize(table.getRelNode) +translate(dataSetPlan) + } + /** +* Translates a logical [[RelNode]] into a [[DataSet]]. +* +* @param logicalPlan The root node of the relational expression tree. +* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. +* @tparam A The type of the resulting [[DataSet]]. +* @return The [[DataSet]] that corresponds to the translated [[Table]]. +*/ + protected def translate[A](logicalPlan: RelNode)(implicit tpe: TypeInformation[A]): DataSet[A] = { --- End diff -- I'll fix that before merging. No need to update the PR. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #2949: [FLINK-5257] [table] display optimized logical pla...
Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/2949#discussion_r91049096 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/BatchTableEnvironment.scala --- @@ -275,17 +278,27 @@ abstract class BatchTableEnvironment( * Table API calls and / or SQL queries and generating corresponding [[DataSet]] operators. * * @param table The root node of the relational expression tree. -* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. +* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. * @tparam A The type of the resulting [[DataSet]]. * @return The [[DataSet]] that corresponds to the translated [[Table]]. */ protected def translate[A](table: Table)(implicit tpe: TypeInformation[A]): DataSet[A] = { +val dataSetPlan = optimize(table.getRelNode) +translate(dataSetPlan) + } + /** +* Translates a logical [[RelNode]] into a [[DataSet]]. +* +* @param logicalPlan The root node of the relational expression tree. +* @param tpe The [[TypeInformation]] of the resulting [[DataSet]]. +* @tparam A The type of the resulting [[DataSet]]. +* @return The [[DataSet]] that corresponds to the translated [[Table]]. +*/ + protected def translate[A](logicalPlan: RelNode)(implicit tpe: TypeInformation[A]): DataSet[A] = { --- End diff -- Just noticed when checking the PR for the merge. This line exceeds the 100 char limit of our Scala style. Please run a local build before opening a PR to catch these issues. Usually it is sufficient to build the modules you touched in the PR (`flink-table` in this case) with `mvn clean install`. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] flink pull request #2949: [FLINK-5257] [table] display optimized logical pla...
GitHub user KurtYoung opened a pull request: https://github.com/apache/flink/pull/2949 [FLINK-5257] [table] display optimized logical plan when explaining table You can merge this pull request into a Git repository by running: $ git pull https://github.com/KurtYoung/flink flink-5257 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2949.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2949 commit d7a0e3300ad9a432ef3994702b7c81f2701521a4 Author: Kurt YoungDate: 2016-12-06T01:23:22Z [FLINK-5257] [table] display optimized logical plan when explaining table --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---