You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/05/27 04:05:04 UTC

[GitHub] [flink] dawidwys opened a new pull request #12325: [FLINK-17931] Document fromValues clause in Table API

dawidwys opened a new pull request #12325:
URL: https://github.com/apache/flink/pull/12325


   ## What is the purpose of the change
   
   Add documentation on the `fromValues` clause.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (**yes** / no)
     - If yes, how is the feature documented? (not applicable / **docs** / JavaDocs / not documented)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #12325: [FLINK-17931] Document fromValues clause in Table API

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12325:
URL: https://github.com/apache/flink/pull/12325#issuecomment-633600802






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] dawidwys closed pull request #12325: [FLINK-17931] Document fromValues clause in Table API

Posted by GitBox <gi...@apache.org>.
dawidwys closed pull request #12325:
URL: https://github.com/apache/flink/pull/12325


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #12325: [FLINK-17931] Document fromValues clause in Table API

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #12325:
URL: https://github.com/apache/flink/pull/12325#issuecomment-633592536






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [flink] aljoscha commented on a change in pull request #12325: [FLINK-17931] Document fromValues clause in Table API

Posted by GitBox <gi...@apache.org>.
aljoscha commented on a change in pull request #12325:
URL: https://github.com/apache/flink/pull/12325#discussion_r435099153



##########
File path: docs/dev/table/tableApi.md
##########
@@ -227,6 +227,50 @@ Table orders = tableEnv.from("Orders");
 {% endhighlight %}
       </td>
   	</tr>
+  	<tr>
+      <td>
+            <strong>Values</strong><br>
+            <span class="label label-primary">Batch</span> <span class="label label-primary">Streaming</span>
+      </td>
+      <td>
+          <p>Similar to the VALUES clause in a SQL query. Produces an inline table out of the provided rows.</p>
+          <p>You can use a `row(...)` expression to create a composite rows:</p>

Review comment:
       ```suggestion
             <p>You can use a `row(...)` expression to create composite rows:</p>
   ```

##########
File path: docs/dev/table/tableApi.md
##########
@@ -227,6 +227,50 @@ Table orders = tableEnv.from("Orders");
 {% endhighlight %}
       </td>
   	</tr>
+  	<tr>
+      <td>
+            <strong>Values</strong><br>
+            <span class="label label-primary">Batch</span> <span class="label label-primary">Streaming</span>
+      </td>
+      <td>
+          <p>Similar to the VALUES clause in a SQL query. Produces an inline table out of the provided rows.</p>
+          <p>You can use a `row(...)` expression to create a composite rows:</p>
+{% highlight java %}
+Table table = tEnv.fromValues(
+   row(1, "ABC"),
+   row(2L, "ABCDE")
+);
+{% endhighlight %}
+          <p>will produce a Table with a schema as follows:</p>
+{% highlight text %}
+root
+|-- f0: BIGINT NOT NULL     // original types INT and BIGINT are generalized to BIGINT
+|-- f1: VARCHAR(5) NOT NULL // original types CHAR(3) and CHAR(5) are generalized
+                            // to VARCHAR(5). It uses VARCHAR instead of CHAR so that
+                            // no padding is applied

Review comment:
       ```suggestion
   |-- f1: VARCHAR(5) NOT NULL // original types CHAR(3) and CHAR(5) are generalized
                               // to VARCHAR(5). VARCHAR is used instead of CHAR so that
                               // no padding is applied
   ```




----------------------------------------------------------------
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:
users@infra.apache.org