twalthr commented on a change in pull request #15428:
URL: https://github.com/apache/flink/pull/15428#discussion_r604979251



##########
File path: 
flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/api/bridge/java/StreamTableEnvironment.java
##########
@@ -202,15 +209,152 @@ static StreamTableEnvironment create(
     /**
      * Converts the given {@link DataStream} into a {@link Table}.
      *
-     * <p>The field names of the {@link Table} are automatically derived from 
the type of the {@link
-     * DataStream}.
+     * <p>Column names and types of the {@link Table} are automatically 
derived from the {@link
+     * TypeInformation} of the {@link DataStream}. If the outermost record's 
{@link TypeInformation}
+     * is a {@link CompositeType}, it will be flattened in the first level. 
{@link TypeInformation}
+     * that cannot be represented as one of the listed {@link DataTypes} will 
be treated as a
+     * black-box {@link DataTypes#RAW(Class, TypeSerializer)} type. Thus, 
composite nested fields
+     * will not be accessible.
+     *
+     * <p>Since the DataStream API does not support changelog processing 
natively, this method
+     * assumes append-only/insert-only semantics during the stream-to-table 
conversion. Records of
+     * type {@link Row} must describe {@link RowKind#INSERT} changes.
+     *
+     * <p>By default, the stream record's timestamp and watermarks are not 
propagated unless

Review comment:
       True, but for clear semantics the current default makes more sense. 
Otherwise we don't know how to name and where to put the time attribute. Also, 
not every data stream has a time attribute. We cannot know this in advance.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to