sunjincheng121 commented on a change in pull request #7121: [FLINK-9555]Support
table api in scala shell
URL: https://github.com/apache/flink/pull/7121#discussion_r238935139
##########
File path:
flink-scala-shell/src/main/scala/org/apache/flink/api/scala/FlinkILoop.scala
##########
@@ -243,22 +257,29 @@ class FlinkILoop(
F L I N K - S C A L A - S H E L L
-NOTE: Use the prebound Execution Environments to implement batch or streaming
programs.
+NOTE: Use the prebound Execution Environments and Table Environment to
implement batch or streaming programs.
- Batch - Use the 'benv' variable
+ Batch - Use the 'benv' and 'btenv' variable
* val dataSet = benv.readTextFile("/path/to/data")
* dataSet.writeAsText("/path/to/output")
* benv.execute("My batch program")
+ *
+ * val batchTable = btenv.fromDataSet(dataSet)
+ * btenv.registerTable("tableName", batchTable)
+ * val result = btenv.sqlQuery("SELECT * FROM tableName").collect
+ HINT: You can use print() on a DataSet to print the contents and collect()
+ a sql query result back to the shell.
Review comment:
`contents and collect()` -> `contents or collect()` ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services