You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (JIRA)" <ji...@apache.org> on 2017/06/21 01:48:00 UTC

[jira] [Comment Edited] (FLINK-6955) Add operation log for Table

    [ https://issues.apache.org/jira/browse/FLINK-6955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16056810#comment-16056810 ] 

Jark Wu edited comment on FLINK-6955 at 6/21/17 1:47 AM:
---------------------------------------------------------

I think we can add this feature into {{.explain()}}. The {{.getLog}} method is a little misleading.


was (Author: jark):
I think we can add this feature into `.explain()`. The `.getLog` method is a little misleading.

> Add operation log for Table
> ---------------------------
>
>                 Key: FLINK-6955
>                 URL: https://issues.apache.org/jira/browse/FLINK-6955
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>            Reporter: Kaibo Zhou
>            Assignee: Kaibo Zhou
>
> In some of the actual production scenarios, the operation of the Table is very complicated, will go through a number of steps. For example, the Table object will be generated at the beginning of the program, in the process of running will be passed to different modules, each module will do some operations for the Table, such as union, join or filter. At the end of the program will call writeToSink or other operations.
> Hoping to record the operation about Table and can print out.
> eg:
> {code}
>     val table1 = StreamTestData.getSmall3TupleDataStream(env).toTable(tEnv, 'a, 'b, 'c)
>     val table2 = StreamTestData.get5TupleDataStream(env).toTable(tEnv, 'a, 'b, 'd, 'c, 'e)
>     val unionDs = table1.unionAll(table2.select('a, 'b, 'c)).filter('b < 2).select('c)
>     val results = unionDs.toDataStream[Row]
>     
>     val result = tEnv.getLog
>     val expected =
>       "UnnamedTable$1 = UnnamedTable$0.select('a, 'b, 'c)\n" +
>         "UnnamedTable$5 = UnnamedTable$2.unionAll(UnnamedTable$1)\n" +
>         "  .filter('b < 2)\n" +
>         "  .select('c)\n"
>     assertEquals(expected, result)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)