[ https://issues.apache.org/jira/browse/FLINK-4068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Walther resolved FLINK-4068. --------------------------------- Resolution: Fixed Fix Version/s: 1.2.0 Fixed in a71133945e66ec471b4cb07da0693d545c40923c and f00e1e7c5578caf52eaffc5cbdd102589c13f52d. > Move constant computations out of code-generated `flatMap` functions. > --------------------------------------------------------------------- > > Key: FLINK-4068 > URL: https://issues.apache.org/jira/browse/FLINK-4068 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL > Affects Versions: 1.1.0 > Reporter: Fabian Hueske > Assignee: Jark Wu > Fix For: 1.2.0 > > > The generated functions for expressions of the Table API or SQL include > constant computations. > For instance the code generated for a predicate like: > {code} > myInt < (10 + 20) > {code} > looks roughly like: > {code} > public void flatMap(Row in, Collector<Row> out) { > Integer in1 = in.productElement(1); > int temp = 10 + 20; > if (in1 < temp) { > out.collect(in) > } > } > {code} > In this example the computation of {{temp}} is constant and could be moved > out of the {{flatMap()}} method. > The same might apply for generated function other than {{FlatMap}} as well. -- This message was sent by Atlassian JIRA (v6.3.4#6332)