[
https://issues.apache.org/jira/browse/FLINK-7005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063126#comment-16063126
]
ASF GitHub Bot commented on FLINK-7005:
---------------------------------------
Github user sunjincheng121 commented on a diff in the pull request:
https://github.com/apache/flink/pull/4186#discussion_r124016791
--- Diff:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/ExpressionReductionTest.scala
---
@@ -422,4 +422,22 @@ class ExpressionReductionTest extends TableTestBase {
util.verifyTable(result, expected)
}
+ @Test
+ def testNestedTablesReduction(): Unit = {
+ val util = streamTestUtil()
--- End diff --
I suggest add a `batchTestUtil()` test case as well.
> Optimization steps are missing for nested registered tables
> -----------------------------------------------------------
>
> Key: FLINK-7005
> URL: https://issues.apache.org/jira/browse/FLINK-7005
> Project: Flink
> Issue Type: Bug
> Components: Table API & SQL
> Affects Versions: 1.3.0, 1.3.1
> Reporter: Timo Walther
> Assignee: Timo Walther
>
> Tables that are registered (implicitly or explicitly) do not pass the first
> three optimization steps:
> - decorrelate
> - convert time indicators
> - normalize the logical plan
> E.g. this has the wrong plan right now:
> {code}
> val table = stream.toTable(tEnv, 'rowtime.rowtime, 'int, 'double, 'float,
> 'bigdec, 'string)
> val table1 = tEnv.sql(s"""SELECT 1 + 1 FROM $table""") // not optimized
> val table2 = tEnv.sql(s"""SELECT myrt FROM $table1""")
> val results = table2.toAppendStream[Row]
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)