[
https://issues.apache.org/jira/browse/FLINK-8381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16317262#comment-16317262
]
ASF GitHub Bot commented on FLINK-8381:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/5257#discussion_r160274966
--- Diff: docs/dev/table/common.md ---
@@ -802,7 +802,87 @@ val dsTuple: DataSet[(String, Int)] =
tableEnv.toDataSet[(String, Int)](table)
### Mapping of Data Types to Table Schema
-Flink's DataStream and DataSet APIs support very diverse types, such as
Tuples (built-in Scala and Flink Java tuples), POJOs, case classes, and atomic
types. In the following we describe how the Table API converts these types into
an internal row representation and show examples of converting a `DataStream`
into a `Table`.
+Flink's DataStream and DataSet APIs support very diverse types. Composite
types such as Tuples (built-in Scala and Flink Java tuples), POJOs, Scala case
classes, and Flink's Row type allow for nested data structures with multiple
fields that can be accessed in table expressions. Other types are treated as
atomic types. In the following, we describe how the Table API converts these
types into an internal row representation and show examples of converting a
`DataStream` into a `Table`.
--- End diff --
The description is the two modes is good, but the following sections for
the different types was not updated.
I think we could describe *Position-based Mapping* and *Name-based Mapping*
first and move the concrete code examples to the individual type sections. For
example for `Tuples` we would show position and name base mappings in the same
code example. This would also highlight the difference.
We should also double-check the text descriptions for the different types.
> Document more flexible schema definition
> ----------------------------------------
>
> Key: FLINK-8381
> URL: https://issues.apache.org/jira/browse/FLINK-8381
> Project: Flink
> Issue Type: Improvement
> Components: Documentation, Table API & SQL
> Reporter: Timo Walther
> Assignee: Timo Walther
>
> FLINK-8203 implemented a more flexible schema definition for registering
> DataSet/DataStream as a table. Documentation should be added with examples.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)