You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/14 05:54:20 UTC
[jira] [Commented] (FLINK-4827) The scala example of SQL on
Streaming Tables with wrong variable name in flink document
[ https://issues.apache.org/jira/browse/FLINK-4827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15574330#comment-15574330 ]
ASF GitHub Bot commented on FLINK-4827:
---------------------------------------
GitHub user hzyuemeng1 opened a pull request:
https://github.com/apache/flink/pull/2632
[FLINK-4827][Docs] The scala example of SQL on Streaming Tables with wrong variable nameā¦
val env = StreamExecutionEnvironment.getExecutionEnvironment
val tEnv = TableEnvironment.getTableEnvironment(env)
// read a DataStream from an external source
val ds: DataStream[(Long, String, Integer)] = env.addSource(...)
// register the DataStream under the name "Orders"
tableEnv.registerDataStream("Orders", ds, 'user, 'product, 'amount)
// run a SQL query on the Table and retrieve the result as a new Table
val result = tableEnv.sql(
"SELECT product, amount FROM Orders WHERE product LIKE '%Rubber%'")
There is no variable named tableEnv had defined ,Only tEnv defined here
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hzyuemeng1/flink document_dev_tableapi_variable_name
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/2632.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2632
----
commit a015a22248295041eef708e84a9d64ec4dcbbecb
Author: hzyuemeng1 <hz...@corp.netease.com>
Date: 2016-10-14T05:38:59Z
The scala example of SQL on Streaming Tables with wrong variable name in flink document
----
> The scala example of SQL on Streaming Tables with wrong variable name in flink document
> ----------------------------------------------------------------------------------------
>
> Key: FLINK-4827
> URL: https://issues.apache.org/jira/browse/FLINK-4827
> Project: Flink
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 1.1.0, 1.1.2
> Reporter: yuemeng
> Priority: Minor
> Fix For: 1.1.3
>
> Attachments: 0001-The-scala-example-of-SQL-on-Streaming-Tables-with-wr.patch
>
>
> val env = StreamExecutionEnvironment.getExecutionEnvironment
> val tEnv = TableEnvironment.getTableEnvironment(env)
> // read a DataStream from an external source
> val ds: DataStream[(Long, String, Integer)] = env.addSource(...)
> // register the DataStream under the name "Orders"
> tableEnv.registerDataStream("Orders", ds, 'user, 'product, 'amount)
> // run a SQL query on the Table and retrieve the result as a new Table
> val result = tableEnv.sql(
> "SELECT product, amount FROM Orders WHERE product LIKE '%Rubber%'")
> There is no variable named tableEnv had defined ,Only tEnv defined here
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)