You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "sunjincheng (JIRA)" <ji...@apache.org> on 2019/04/19 14:17:00 UTC
[jira] [Closed] (FLINK-12026) Remove the `xxxInternal` method from
TableImpl
[ https://issues.apache.org/jira/browse/FLINK-12026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
sunjincheng closed FLINK-12026.
-------------------------------
Resolution: Fixed
Fix Version/s: 1.9.0
Fixed in master: c96a4d7afe379a291cc538ca36af896df8dc2127
> Remove the `xxxInternal` method from TableImpl
> ----------------------------------------------
>
> Key: FLINK-12026
> URL: https://issues.apache.org/jira/browse/FLINK-12026
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Affects Versions: 1.9.0
> Reporter: sunjincheng
> Assignee: sunjincheng
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.9.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> At present, each operator of TableImpl has an internal method of `xxxInternal`, and `xxxInternal` is a temp method. I think it can be removed at present to further simplify the code. Such as:
> From:
> {code:java}
> override def select(fields: String): Table = {
> select(ExpressionParser.parseExpressionList(fields): _*)
> }
> override def select(fields: Expression*): Table = {
> selectInternal(fields.map(tableImpl.expressionBridge.bridge))
> }
> private def selectInternal(fields: Seq[PlannerExpression]): Table = {
> ...
> // implementtition logic
> ...
> }{code}
> To:
> {code:java}
> override def select(fields: String): Table = {
> select(ExpressionParser.parseExpressionList(fields): _*)
> }
> override def select(fields: Expression*): Table = {
> ...
> // implementtition logic
> ...
> }{code}
>
> I think the implementtition logic can move into `select(fields: Expression*)`. What do you think? [~dawidwys] [~hequn8128]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)