zjffdu 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_r236504436
 
 

 ##########
 File path: 
flink-scala-shell/src/main/scala/org/apache/flink/api/scala/FlinkILoop.scala
 ##########
 @@ -243,22 +254,22 @@ 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.sqlQuery("SELECT * FROM tableName")
     HINT: You can use print() on a DataSet to print the contents to the shell.
 
-  Streaming - Use the 'senv' variable
+  Streaming - Use the 'senv' and 'stenv' variable
 
     * val dataStream = senv.fromElements(1, 2, 3, 4)
     * dataStream.countWindowAll(2).sum(0).print()
     * senv.execute("My streaming program")
-
+    * val streamTable = stenv.sqlQuery("SELECT * FROM tableName")
 
 Review comment:
   Add example of registering table via `senv` then query it via `stenv`.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to