Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
This should work:
def main(args: Array[String]): Unit = { // set up execution environment val env = ExecutionEnvironment.getExecutionEnvironment val tEnv = TableEnvironment.getTableEnvironment(env) val input = env.fromElements(WC("hello", 1), WC("hello", 1), WC("ciao", 1)) // register the DataSet as table "WordCount" tEnv.registerDataSet("WordCount", input, 'word, 'frequency) tEnv.registerTable("WordCount2", tEnv.fromDataSet(input, 'word, 'frequency).select('word).filter('word !== "hello")) // run a SQL query on the Table and retrieve the result as a new Table val table = tEnv.sql("SELECT word, SUM(frequency) FROM WordCount WHERE word NOT IN (SELECT word FROM WordCount2) GROUP BY word") table.toDataSet[WC].print() }
Attachments
Issue Links
- requires
-
FLINK-5159 Improve perfomance of inner joins with a single row input
- Closed
- links to