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/03/27 02:52:00 UTC
[jira] [Updated] (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 updated FLINK-12026:
--------------------------------
Description:
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]
was:
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.
What do you think? [~dawidwys] [~hequn8128]
> 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
>
> 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)