[ 
https://issues.apache.org/jira/browse/FLINK-10487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637608#comment-16637608
 ] 

ASF GitHub Bot commented on FLINK-10487:
----------------------------------------

bowenli86 opened a new pull request #6790: [FLINK-10487] fix invalid Flink SQL 
example and add runnable SQL example for Java API
URL: https://github.com/apache/flink/pull/6790
 
 
   ## What is the purpose of the change
   
   Fix invalid java example (which uses a non-existing API) in doc
   
   ## Brief change log
   
     - Fix the invalid java example to use correct SQL API
     - Add a runnable Flink SQL example for Java. The example's logic is the 
same as the corresponding example in scala
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   The example can be run manually to verify it.
   
   ## Does this pull request potentially affect one of the following parts:
   
   none
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
   
   

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


> fix invalid Flink SQL example
> -----------------------------
>
>                 Key: FLINK-10487
>                 URL: https://issues.apache.org/jira/browse/FLINK-10487
>             Project: Flink
>          Issue Type: Bug
>          Components: Documentation, Table API & SQL
>    Affects Versions: 1.6.0, 1.6.1, 1.7.0
>            Reporter: Bowen Li
>            Assignee: Bowen Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> On https://ci.apache.org/projects/flink/flink-docs-master/dev/table/sql.html 
> , the example is :
> {code:java}
> StreamExecutionEnvironment env = 
> StreamExecutionEnvironment.getExecutionEnvironment();
> StreamTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env);
> // ingest a DataStream from an external source
> DataStream<Tuple3<Long, String, Integer>> ds = env.addSource(...);
> // SQL query with an inlined (unregistered) table
> Table table = tableEnv.toTable(ds, "user, product, amount");
> Table result = tableEnv.sqlQuery(
>   "SELECT SUM(amount) FROM " + table + " WHERE product LIKE '%Rubber%'");
> ...
> {code}
> But there's no API of {{toTable()}} in StreamTableEnvironment 
> cc [~fhueske]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to