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

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

Github user alpinegizmo commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4020#discussion_r119151221
  
    --- Diff: docs/dev/table/streaming.md ---
    @@ -39,17 +39,293 @@ Dynamic table
     Time Attributes
     ---------------
     
    -### Event-time
    +Flink supports different notions of *time* in streaming programs.
     
    -* DataStream: Timestamps & WMs required, `.rowtime` (replace attribute or 
extend schema)
    -* TableSource: Timestamps & WMs & DefinedRowtimeAttribute
    +- *Processing time* refers to the system time of the machine (also known 
as "wall-clock time") that is executing the respective operation.
    +- *Event time* is the time that each individual event occurred on its 
producing device.
    +- *Ingestion time* is the time that events enter Flink, internally, it is 
treated similar to event time.
     
    -{% top %}
    +For more information about time handling in Flink, see the introduction 
about [Event Time and Watermarks]({{ site.baseurl }}/dev/event_time.html).
    +
    +Table programs assume that a corresponding time characteristic has been 
specified for the streaming environment:
    +
    +<div class="codetabs" markdown="1">
    +<div data-lang="java" markdown="1">
    +{% highlight java %}
    +final StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();
    +
    +env.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime); // 
default
    +
    +// alternatively:
    +// env.setStreamTimeCharacteristic(TimeCharacteristic.IngestionTime);
    +// env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
    +{% endhighlight %}
    +</div>
    +<div data-lang="scala" markdown="1">
    +{% highlight scala %}
    +val env = StreamExecutionEnvironment.getExecutionEnvironment
    +
    +env.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime) 
//default
    +
    +// alternatively:
    +// env.setStreamTimeCharacteristic(TimeCharacteristic.IngestionTime)
    +// env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime)
    +{% endhighlight %}
    +</div>
    +</div>
    +
    +Time-based operations such as [windows]({{ site.baseurl 
}}/dev/table/tableApi.html) in both the Table API and SQL require information 
about the notion of time and its origin. Therefore, tables can offer *logical 
time attributes* for indicating time and accessing corresponding timestamps in 
table programs.
    +
    +Time attributes can be part of every table schema. They are defined when 
creating a table from a `DataStream` or pre-defined when using a `TableSource`. 
Once a time attribute is defined at the beginning, it can be referenced as 
field and used in time-based operations.
    --- End diff --
    
    They are defined when creating a table from a `DataStream` or are 
pre-defined when using a `TableSource`. Once a time attribute has been defined, 
it can be referenced as a field and can be used in time-based operations.


> Table API / SQL Docs: Streaming Page
> ------------------------------------
>
>                 Key: FLINK-6747
>                 URL: https://issues.apache.org/jira/browse/FLINK-6747
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Documentation, Table API & SQL
>    Affects Versions: 1.3.0
>            Reporter: Fabian Hueske
>            Assignee: Timo Walther
>
> Update and refine {{./docs/dev/table/streaming.md}} in feature branch 
> https://github.com/apache/flink/tree/tableDocs



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to