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/17 12:34:58 UTC

[GitHub] [flink] godfreyhe opened a new pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

godfreyhe opened a new pull request #12199:
URL: https://github.com/apache/flink/pull/12199


   
   ## What is the purpose of the change
   
   *[FLINK-17252](https://issues.apache.org/jira/browse/FLINK-17252) has supported select query, however only append change is supported. because [FLINK-16998](https://issues.apache.org/jira/browse/FLINK-16998) is not finished. This issue aims to support all kinds of changes based on FLINK-16998.*
   
   
   ## Brief change log
   
     - *Introduce SelectSinkOperation for select sink operation*
     - *Introduce SelectResultProvider to share the select result info between planner and table environment*
     - *remove Planner#createSelectTableSink method*
     - *remove BatchSelectTableSink and StreamSelectTableSink, and implements BatchSelectTableSinkFactory and StreamSelectTableSinkFactory in blink planner*
     - *refactor BatchSelectTableSink and StreamSelectTableSink in legacy planner*
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - *Extended TableITCase and TableEnvironmentITCase to verify the result*
   
   
   ## 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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057",
       "triggerID" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f07d136e61bd7024ccc58c9221f14d37ae7fb4b5",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2608",
       "triggerID" : "f07d136e61bd7024ccc58c9221f14d37ae7fb4b5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5b62118449cdf8d0de8d5b98781fdff9c2d0c571 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057) 
   * f07d136e61bd7024ccc58c9221f14d37ae7fb4b5 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2608) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a1729c5513f3a86af9e6b9d0dec00325e375c7b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a1729c5513f3a86af9e6b9d0dec00325e375c7b Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] godfreyhe commented on pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   @flinkbot run azure


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057",
       "triggerID" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5b62118449cdf8d0de8d5b98781fdff9c2d0c571 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7f7d4c37fb57c5caaa862226305c6994fe622898 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861) 
   * 5b62118449cdf8d0de8d5b98781fdff9c2d0c571 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] wuchong commented on pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   Build is passed, Merging...


----------------------------------------------------------------
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] TsReaper commented on a change in pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/sinks/BatchSelectTableSink.java
##########
@@ -43,71 +43,68 @@
 import java.util.concurrent.ExecutionException;
 
 /**
- * A {@link SelectTableSink} for batch select job.
+ * A {@link StreamTableSink} for batch select job to collect the result to local.
  *
  * <p><strong>NOTES:</strong> This is a temporary solution,
  * once FLINK-14807 is finished, the implementation should be changed.
  */
-public class BatchSelectTableSink implements StreamTableSink<Row>, SelectTableSink {
-	private final TableSchema tableSchema;
+public class BatchSelectTableSink extends SelectTableSinkBase<RowData> implements StreamTableSink<RowData> {
 	private final String accumulatorName;
-	private final TypeSerializer<Row> typeSerializer;
-	private JobClient jobClient;
+	private final TypeSerializer<RowData> typeSerializer;
 
 	@SuppressWarnings("unchecked")
 	public BatchSelectTableSink(TableSchema tableSchema) {
-		this.tableSchema = SelectTableSinkSchemaConverter.convertTimeAttributeToRegularTimestamp(
-				SelectTableSinkSchemaConverter.changeDefaultConversionClass(tableSchema));
+		super(tableSchema);
 		this.accumulatorName = new AbstractID().toString();
-		this.typeSerializer = (TypeSerializer<Row>) TypeInfoDataTypeConverter
-				.fromDataTypeToTypeInfo(this.tableSchema.toRowDataType())
-				.createSerializer(new ExecutionConfig());
+		this.typeSerializer = rowDataTypeInfo.createSerializer(new ExecutionConfig());
 	}
 
 	@Override
-	public DataType getConsumedDataType() {
-		return tableSchema.toRowDataType();
+	public TypeInformation<RowData> getOutputType() {
+		return rowDataTypeInfo;
 	}
 
 	@Override
-	public TableSchema getTableSchema() {
-		return tableSchema;
-	}
-
-	@Override
-	public DataStreamSink<?> consumeDataStream(DataStream<Row> dataStream) {
+	public DataStreamSink<?> consumeDataStream(DataStream<RowData> dataStream) {
 		return dataStream.writeUsingOutputFormat(
 				new Utils.CollectHelper<>(accumulatorName, typeSerializer))
 				.name("Batch select table sink")
 				.setParallelism(1);
 	}
 
 	@Override
-	public void setJobClient(JobClient jobClient) {
-		this.jobClient = Preconditions.checkNotNull(jobClient, "jobClient should not be null");
-	}
+	public SelectResultProvider getSelectResultProvider() {
+		return new SelectResultProvider() {

Review comment:
       Move into an inner class. The implementation is too long for an anonymous class.

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/sinks/StreamSelectTableSink.java
##########
@@ -66,30 +66,44 @@ public StreamSelectTableSink(TableSchema tableSchema) {
 	}
 
 	@Override
-	public DataType getConsumedDataType() {
-		return tableSchema.toRowDataType();
+	public TypeInformation<RowData> getRecordType() {
+		return rowDataTypeInfo;
 	}
 
 	@Override
-	public TableSchema getTableSchema() {
-		return tableSchema;
-	}
-
-	@Override
-	public DataStreamSink<?> consumeDataStream(DataStream<Row> dataStream) {
+	public DataStreamSink<?> consumeDataStream(DataStream<Tuple2<Boolean, RowData>> dataStream) {
 		return dataStream
 				.addSink(new CollectSink<>(iterator.getBindAddress(), iterator.getPort(), typeSerializer))
 				.name("Streaming select table sink")
 				.setParallelism(1);
 	}
 
 	@Override
-	public void setJobClient(JobClient jobClient) {
-	}
+	public SelectResultProvider getSelectResultProvider() {
+		return new SelectResultProvider() {

Review comment:
       Also move this to an inner class.

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/sinks/StreamSelectTableSink.java
##########
@@ -19,44 +19,44 @@
 package org.apache.flink.table.planner.sinks;
 
 import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.typeinfo.TypeInformation;
+import org.apache.flink.api.common.typeinfo.Types;
 import org.apache.flink.api.common.typeutils.TypeSerializer;
+import org.apache.flink.api.java.tuple.Tuple2;
+import org.apache.flink.api.java.typeutils.TupleTypeInfo;
 import org.apache.flink.core.execution.JobClient;
 import org.apache.flink.streaming.api.datastream.DataStream;
 import org.apache.flink.streaming.api.datastream.DataStreamSink;
 import org.apache.flink.streaming.experimental.CollectSink;
 import org.apache.flink.streaming.experimental.SocketStreamIterator;
 import org.apache.flink.table.api.TableException;
 import org.apache.flink.table.api.TableSchema;
-import org.apache.flink.table.api.internal.SelectTableSink;
-import org.apache.flink.table.runtime.types.TypeInfoDataTypeConverter;
-import org.apache.flink.table.sinks.AppendStreamTableSink;
-import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.api.internal.SelectResultProvider;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.sinks.RetractStreamTableSink;
 import org.apache.flink.types.Row;
 
 import java.io.IOException;
 import java.net.InetAddress;
 import java.util.Iterator;
 
 /**
- * A {@link SelectTableSink} for streaming select job.
+ * A {@link RetractStreamTableSink} for streaming select job to collect the result to local.
  *
  * <p><strong>NOTES:</strong> This is a temporary solution,
  * once FLINK-14807 is finished, the implementation should be changed.
- * Currently, only insert changes (AppendStreamTableSink) is supported.
- * Once FLINK-16998 is finished, all kinds of changes will be supported.
  */
-public class StreamSelectTableSink implements AppendStreamTableSink<Row>, SelectTableSink {
-	private final TableSchema tableSchema;
-	private final TypeSerializer<Row> typeSerializer;
-	private final SocketStreamIterator<Row> iterator;
+public class StreamSelectTableSink
+		extends SelectTableSinkBase<Tuple2<Boolean, RowData>>
+		implements RetractStreamTableSink<RowData> {
+	private final TypeSerializer<Tuple2<Boolean, RowData>> typeSerializer;
+	private final SocketStreamIterator<Tuple2<Boolean, RowData>> iterator;
 
 	@SuppressWarnings("unchecked")
 	public StreamSelectTableSink(TableSchema tableSchema) {
-		this.tableSchema = SelectTableSinkSchemaConverter.convertTimeAttributeToRegularTimestamp(
-				SelectTableSinkSchemaConverter.changeDefaultConversionClass(tableSchema));
-		this.typeSerializer = (TypeSerializer<Row>) TypeInfoDataTypeConverter
-				.fromDataTypeToTypeInfo(this.tableSchema.toRowDataType())
-				.createSerializer(new ExecutionConfig());
+		super(tableSchema);
+		TypeInformation<Tuple2<Boolean, RowData>> tupleTypeInfo = new TupleTypeInfo<>(Types.BOOLEAN, rowDataTypeInfo);

Review comment:
       Add comments to state that we're not using this boolean value and we define this only because of `RetractStreamTableSink`.

##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/sinks/BatchSelectTableSink.java
##########
@@ -74,33 +79,39 @@ public TableSchema getTableSchema() {
 				.setParallelism(1);
 	}
 
-	@Override
-	public void setJobClient(JobClient jobClient) {
-		this.jobClient = Preconditions.checkNotNull(jobClient, "jobClient should not be null");
-	}
+	public SelectResultProvider getSelectResultProvider() {
+		return new SelectResultProvider() {

Review comment:
       ditto.

##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/sinks/StreamSelectTableSink.java
##########
@@ -58,29 +61,61 @@ public StreamSelectTableSink(TableSchema tableSchema) {
 	}
 
 	@Override
-	public DataType getConsumedDataType() {
-		return tableSchema.toRowDataType();
+	public TableSchema getTableSchema() {
+		return tableSchema;
 	}
 
 	@Override
-	public TableSchema getTableSchema() {
-		return tableSchema;
+	public TableSink<Tuple2<Boolean, Row>> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes) {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public TypeInformation<Row> getRecordType() {
+		return tableSchema.toRowType();
+	}
+
+	@Override
+	public TupleTypeInfo<Tuple2<Boolean, Row>> getOutputType() {
+		return new TupleTypeInfo<>(Types.BOOLEAN, getRecordType());
 	}
 
 	@Override
-	public DataStreamSink<?> consumeDataStream(DataStream<Row> dataStream) {
+	public DataStreamSink<?> consumeDataStream(DataStream<Tuple2<Boolean, Row>> dataStream) {
 		return dataStream
 				.addSink(new CollectSink<>(iterator.getBindAddress(), iterator.getPort(), typeSerializer))
 				.name("Streaming select table sink")
 				.setParallelism(1);
 	}
 
-	@Override
-	public void setJobClient(JobClient jobClient) {
-	}
+	public SelectResultProvider getSelectResultProvider() {
+		return new SelectResultProvider() {

Review comment:
       ditto.




----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828) 
   * 45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d735316bc8301f79352fe1cc0d05d67d51b52766 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] wuchong commented on a change in pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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



##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/api/TableITCase.scala
##########
@@ -104,14 +104,35 @@ class TableITCase(tableEnvName: String, isStreaming: Boolean) extends TestLogger
 
   @Test
   def testExecuteWithUpdateChanges(): Unit = {

Review comment:
       Is this the same with `TableEnvironmentITCase#testExecuteSelectWithUpdateChanges`?

##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/delegation/PlannerBase.scala
##########
@@ -186,6 +186,21 @@ abstract class PlannerBase(
           "UnregisteredSink",
           ConnectorCatalogTable.sink(s.getSink, !isStreamingMode))
 
+      case s: SelectSinkOperation =>
+        val input = getRelBuilder.queryOperation(s.getChild).build()
+        // convert query schema to sink schema
+        val sinkSchema = SelectTableSinkSchemaConverter.convertTimeAttributeToRegularTimestamp(
+          SelectTableSinkSchemaConverter.changeDefaultConversionClass(s.getChild.getTableSchema))

Review comment:
       Why do we need to use default conversion class here?

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/sinks/SelectTableSinkBase.java
##########
@@ -28,61 +28,106 @@
 import org.apache.flink.streaming.api.operators.collect.CollectSinkOperatorFactory;
 import org.apache.flink.streaming.api.operators.collect.CollectStreamSink;
 import org.apache.flink.table.api.TableSchema;
-import org.apache.flink.table.api.internal.SelectTableSink;
-import org.apache.flink.table.runtime.types.TypeInfoDataTypeConverter;
+import org.apache.flink.table.api.internal.SelectResultProvider;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.data.util.DataFormatConverters;
+import org.apache.flink.table.runtime.typeutils.RowDataTypeInfo;
+import org.apache.flink.table.sinks.StreamTableSink;
+import org.apache.flink.table.sinks.TableSink;
 import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.types.logical.LogicalType;
 import org.apache.flink.types.Row;
 
 import java.util.Iterator;
 import java.util.UUID;
+import java.util.stream.Stream;
 
 /**
- * Basic implementation of {@link SelectTableSink}.
+ * Basic implementation of {@link StreamTableSink} for select job to collect the result to local.
  */
-public class SelectTableSinkBase implements SelectTableSink {
+public abstract class SelectTableSinkBase<T> implements StreamTableSink<T> {
 
 	private final TableSchema tableSchema;
-	private final CollectSinkOperatorFactory<Row> factory;
-	private final CollectResultIterator<Row> iterator;
+	protected final DataFormatConverters.DataFormatConverter<RowData, Row> converter;
+
+	private final CollectSinkOperatorFactory<T> factory;
+	private final CollectResultIterator<T> iterator;
 
 	@SuppressWarnings("unchecked")
-	public SelectTableSinkBase(TableSchema tableSchema) {
-		this.tableSchema = SelectTableSinkSchemaConverter.convertTimeAttributeToRegularTimestamp(
-			SelectTableSinkSchemaConverter.changeDefaultConversionClass(tableSchema));
+	public SelectTableSinkBase(TableSchema schema, TypeSerializer<T> typeSerializer) {
+		this.tableSchema = schema;
+		this.converter = DataFormatConverters.getConverterForDataType(this.tableSchema.toPhysicalRowDataType());

Review comment:
       A better way is use `DataStructureConverters.getConverter` which covers full data types (but requires to call open() first in runtime). 

##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableResultImpl.java
##########
@@ -197,13 +198,13 @@ public TableResult build() {
 	 */
 	public interface PrintStyle {
 		/**
-		 * Create a tableau print style with given max column width and null column,
+		 * Create a tableau print style with given max column width, null column and change mode indicator,
 		 * which prints the result schema and content as tableau form.
 		 */
-		static PrintStyle tableau(int maxColumnWidth, String nullColumn) {
+		static PrintStyle tableau(int maxColumnWidth, String nullColumn, boolean printChangeMode) {

Review comment:
       Could you change all the `printChangeMode` to `printRowKind`? It will be more align with our current concept. Change mode sounds more like `ChangelogMode`.




----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843) 
   * 7f7d4c37fb57c5caaa862226305c6994fe622898 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cff8424e532db0bfc3ca58b8b6da13d3d69b0559 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787) 
   * 4ffe1d6e34ee30dbbc59fd59b77110a241391510 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] godfreyhe commented on pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   @wuchong do you have any other concern ?


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d735316bc8301f79352fe1cc0d05d67d51b52766 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722) 
   * cff8424e532db0bfc3ca58b8b6da13d3d69b0559 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] TsReaper commented on pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   Azure for latest commit already passed in https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=1861&view=results


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f11005c6596ecf41efd898ba324374948b2eb8cb Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678) 
   * d735316bc8301f79352fe1cc0d05d67d51b52766 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] godfreyhe commented on pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   @flinkbot run azure


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a1729c5513f3a86af9e6b9d0dec00325e375c7b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f11005c6596ecf41efd898ba324374948b2eb8cb Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cff8424e532db0bfc3ca58b8b6da13d3d69b0559 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787) 
   * 4ffe1d6e34ee30dbbc59fd59b77110a241391510 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f11005c6596ecf41efd898ba324374948b2eb8cb Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678) 
   * d735316bc8301f79352fe1cc0d05d67d51b52766 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a1729c5513f3a86af9e6b9d0dec00325e375c7b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618) 
   * f11005c6596ecf41efd898ba324374948b2eb8cb UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a1729c5513f3a86af9e6b9d0dec00325e375c7b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618) 
   * f11005c6596ecf41efd898ba324374948b2eb8cb Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828) 
   * 45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] TsReaper commented on a change in pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/sinks/SelectTableSinkBase.java
##########
@@ -28,61 +28,102 @@
 import org.apache.flink.streaming.api.operators.collect.CollectSinkOperatorFactory;
 import org.apache.flink.streaming.api.operators.collect.CollectStreamSink;
 import org.apache.flink.table.api.TableSchema;
-import org.apache.flink.table.api.internal.SelectTableSink;
-import org.apache.flink.table.runtime.types.TypeInfoDataTypeConverter;
+import org.apache.flink.table.api.internal.SelectResultProvider;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.data.util.DataFormatConverters;
+import org.apache.flink.table.runtime.typeutils.RowDataTypeInfo;
+import org.apache.flink.table.sinks.StreamTableSink;
+import org.apache.flink.table.sinks.TableSink;
 import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.types.logical.LogicalType;
 import org.apache.flink.types.Row;
 
 import java.util.Iterator;
 import java.util.UUID;
+import java.util.stream.Stream;
 
 /**
- * Basic implementation of {@link SelectTableSink}.
+ * Basic implementation of {@link StreamTableSink} for select job to collect the result to local.
  */
-public class SelectTableSinkBase implements SelectTableSink {
+public abstract class SelectTableSinkBase<T> implements StreamTableSink<T> {
 
 	private final TableSchema tableSchema;
-	private final CollectSinkOperatorFactory<Row> factory;
-	private final CollectResultIterator<Row> iterator;
+	protected final DataFormatConverters.DataFormatConverter<RowData, Row> converter;
+
+	private final CollectSinkOperatorFactory<T> factory;
+	private final CollectResultIterator<T> iterator;
 
 	@SuppressWarnings("unchecked")
-	public SelectTableSinkBase(TableSchema tableSchema) {
+	public SelectTableSinkBase(TableSchema schema, TypeSerializer<T> typeSerializer) {
 		this.tableSchema = SelectTableSinkSchemaConverter.convertTimeAttributeToRegularTimestamp(
-			SelectTableSinkSchemaConverter.changeDefaultConversionClass(tableSchema));
+				SelectTableSinkSchemaConverter.changeDefaultConversionClass(schema));
+		this.converter = DataFormatConverters.getConverterForDataType(this.tableSchema.toPhysicalRowDataType());
 
-		TypeSerializer<Row> typeSerializer = (TypeSerializer<Row>) TypeInfoDataTypeConverter
-			.fromDataTypeToTypeInfo(this.tableSchema.toRowDataType())
-			.createSerializer(new ExecutionConfig());
 		String accumulatorName = "tableResultCollect_" + UUID.randomUUID();
-
 		this.factory = new CollectSinkOperatorFactory<>(typeSerializer, accumulatorName);
 		CollectSinkOperator<Row> operator = (CollectSinkOperator<Row>) factory.getOperator();
 		this.iterator = new CollectResultIterator<>(operator.getOperatorIdFuture(), typeSerializer, accumulatorName);
 	}
 
 	@Override
-	public DataType getConsumedDataType() {
-		return tableSchema.toRowDataType();
+	public TableSchema getTableSchema() {
+		return tableSchema;
 	}
 
 	@Override
-	public TableSchema getTableSchema() {
-		return tableSchema;
+	public TableSink<T> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes) {
+		throw new UnsupportedOperationException();
 	}
 
-	protected DataStreamSink<?> consumeDataStream(DataStream<Row> dataStream) {
-		CollectStreamSink<Row> sink = new CollectStreamSink<>(dataStream, factory);
+	@Override
+	public DataStreamSink<?> consumeDataStream(DataStream<T> dataStream) {
+		CollectStreamSink<?> sink = new CollectStreamSink<>(dataStream, factory);
 		dataStream.getExecutionEnvironment().addOperator(sink.getTransformation());
 		return sink.name("Select table sink");
 	}
 
-	@Override
-	public void setJobClient(JobClient jobClient) {
-		iterator.setJobClient(jobClient);
+	public SelectResultProvider getSelectResultProvider() {
+		return new SelectResultProvider() {
+			@Override
+			public void setJobClient(JobClient jobClient) {
+				iterator.setJobClient(jobClient);
+			}
+
+			@Override
+			public Iterator<Row> getResultIterator() {
+				return new RowIteratorWrapper(iterator);
+			}
+		};
 	}
 
-	@Override
-	public Iterator<Row> getResultIterator() {
-		return iterator;
+	/**
+	 * An Iterator wrapper class that converts Iterator&lt;T&gt; to Iterator&lt;Row&gt;.
+	 */
+	private class RowIteratorWrapper implements Iterator<Row> {

Review comment:
       Should also implement `AutoClosable`, otherwise job related resources will not be disposed if user reads only a partial of results.

##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/sinks/StreamSelectTableSink.java
##########
@@ -69,19 +72,54 @@ public TableSchema getTableSchema() {
 	}
 
 	@Override
-	public DataStreamSink<?> consumeDataStream(DataStream<Row> dataStream) {
-		CollectStreamSink<Row> sink = new CollectStreamSink<>(dataStream, factory);
+	public TableSink<Tuple2<Boolean, Row>> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes) {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public DataStreamSink<?> consumeDataStream(DataStream<Tuple2<Boolean, Row>> dataStream) {
+		CollectStreamSink<?> sink = new CollectStreamSink<>(dataStream, factory);
 		dataStream.getExecutionEnvironment().addOperator(sink.getTransformation());
 		return sink.name("Streaming select table sink");
 	}
 
-	@Override
-	public void setJobClient(JobClient jobClient) {
-		iterator.setJobClient(jobClient);
+	public SelectResultProvider getSelectResultProvider() {
+		return new SelectResultProvider() {
+
+			@Override
+			public void setJobClient(JobClient jobClient) {
+				iterator.setJobClient(jobClient);
+			}
+
+			@Override
+			public Iterator<Row> getResultIterator() {
+				return new RowIteratorWrapper(iterator);
+			}
+		};
 	}
 
-	@Override
-	public Iterator<Row> getResultIterator() {
-		return iterator;
+	/**
+	 * An Iterator wrapper class that converts Iterator&lt;Tuple2&lt;Boolean, Row&gt;&gt; to Iterator&lt;Row&gt;.
+	 */
+	private static class RowIteratorWrapper implements Iterator<Row> {

Review comment:
       ditto.




----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 111f364a894466227faa44bb28c18884e5509b59 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816) 
   * 43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057",
       "triggerID" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f07d136e61bd7024ccc58c9221f14d37ae7fb4b5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2608",
       "triggerID" : "f07d136e61bd7024ccc58c9221f14d37ae7fb4b5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f07d136e61bd7024ccc58c9221f14d37ae7fb4b5 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2608) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4ffe1d6e34ee30dbbc59fd59b77110a241391510 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811) 
   * 111f364a894466227faa44bb28c18884e5509b59 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057",
       "triggerID" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7f7d4c37fb57c5caaa862226305c6994fe622898 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861) 
   * 5b62118449cdf8d0de8d5b98781fdff9c2d0c571 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7f7d4c37fb57c5caaa862226305c6994fe622898 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] godfreyhe commented on a change in pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/sinks/SelectTableSinkBase.java
##########
@@ -28,61 +28,106 @@
 import org.apache.flink.streaming.api.operators.collect.CollectSinkOperatorFactory;
 import org.apache.flink.streaming.api.operators.collect.CollectStreamSink;
 import org.apache.flink.table.api.TableSchema;
-import org.apache.flink.table.api.internal.SelectTableSink;
-import org.apache.flink.table.runtime.types.TypeInfoDataTypeConverter;
+import org.apache.flink.table.api.internal.SelectResultProvider;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.data.util.DataFormatConverters;
+import org.apache.flink.table.runtime.typeutils.RowDataTypeInfo;
+import org.apache.flink.table.sinks.StreamTableSink;
+import org.apache.flink.table.sinks.TableSink;
 import org.apache.flink.table.types.DataType;
+import org.apache.flink.table.types.logical.LogicalType;
 import org.apache.flink.types.Row;
 
 import java.util.Iterator;
 import java.util.UUID;
+import java.util.stream.Stream;
 
 /**
- * Basic implementation of {@link SelectTableSink}.
+ * Basic implementation of {@link StreamTableSink} for select job to collect the result to local.
  */
-public class SelectTableSinkBase implements SelectTableSink {
+public abstract class SelectTableSinkBase<T> implements StreamTableSink<T> {
 
 	private final TableSchema tableSchema;
-	private final CollectSinkOperatorFactory<Row> factory;
-	private final CollectResultIterator<Row> iterator;
+	protected final DataFormatConverters.DataFormatConverter<RowData, Row> converter;
+
+	private final CollectSinkOperatorFactory<T> factory;
+	private final CollectResultIterator<T> iterator;
 
 	@SuppressWarnings("unchecked")
-	public SelectTableSinkBase(TableSchema tableSchema) {
-		this.tableSchema = SelectTableSinkSchemaConverter.convertTimeAttributeToRegularTimestamp(
-			SelectTableSinkSchemaConverter.changeDefaultConversionClass(tableSchema));
+	public SelectTableSinkBase(TableSchema schema, TypeSerializer<T> typeSerializer) {
+		this.tableSchema = schema;
+		this.converter = DataFormatConverters.getConverterForDataType(this.tableSchema.toPhysicalRowDataType());

Review comment:
       I find there some types that `DataStructureConverters` can't handle, such as when running `CalcITCase#testExternalTypeFunc1`, I get the following exception:
   
   ```
   java.lang.ClassCastException: org.apache.flink.table.types.logical.TypeInformationRawType cannot be cast to org.apache.flink.table.types.logical.RawType
   
   	at org.apache.flink.table.data.conversion.RawObjectConverter.create(RawObjectConverter.java:56)
   	at org.apache.flink.table.data.conversion.DataStructureConverters.getConverterInternal(DataStructureConverters.java:157)
   	at org.apache.flink.table.data.conversion.DataStructureConverters.getConverter(DataStructureConverters.java:136)
   	at org.apache.flink.table.data.conversion.RowRowConverter.lambda$create$0(RowRowConverter.java:87)
   ```




----------------------------------------------------------------
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] godfreyhe commented on pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   @flinkbot run azure


----------------------------------------------------------------
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] godfreyhe commented on a change in pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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



##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/delegation/PlannerBase.scala
##########
@@ -186,6 +186,21 @@ abstract class PlannerBase(
           "UnregisteredSink",
           ConnectorCatalogTable.sink(s.getSink, !isStreamingMode))
 
+      case s: SelectSinkOperation =>
+        val input = getRelBuilder.queryOperation(s.getChild).build()
+        // convert query schema to sink schema
+        val sinkSchema = SelectTableSinkSchemaConverter.convertTimeAttributeToRegularTimestamp(
+          SelectTableSinkSchemaConverter.changeDefaultConversionClass(s.getChild.getTableSchema))

Review comment:
       to handle legacy types




----------------------------------------------------------------
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] wuchong closed pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843) 
   * 7f7d4c37fb57c5caaa862226305c6994fe622898 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 3a1729c5513f3a86af9e6b9d0dec00325e375c7b (Sun May 17 12:43:25 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-17774).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4ffe1d6e34ee30dbbc59fd59b77110a241391510 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811) 
   * 111f364a894466227faa44bb28c18884e5509b59 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816) 
   * 43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d735316bc8301f79352fe1cc0d05d67d51b52766 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722) 
   * cff8424e532db0bfc3ca58b8b6da13d3d69b0559 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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] TsReaper commented on a change in pull request #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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



##########
File path: flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/PrintUtils.java
##########
@@ -124,17 +134,22 @@ public static void printAsTableauForm(
 	}
 
 	public static String[] rowToString(Row row) {
-		return rowToString(row, NULL_COLUMN);
+		return rowToString(row, NULL_COLUMN, false);
 	}
 
-	public static String[] rowToString(Row row, String nullColumn) {
-		final String[] fields = new String[row.getArity()];
+	public static String[] rowToString(Row row, String nullColumn, boolean printChangeMode) {
+		final int len = printChangeMode ? row.getArity() + 1 : row.getArity();
+		final String[] fields = new String[len];
+		int index = 0;
+		if (printChangeMode) {
+			fields[index++] = row.getKind().shortString();
+		}
 		for (int i = 0; i < row.getArity(); i++) {
 			final Object field = row.getField(i);
 			if (field == null) {
-				fields[i] = nullColumn;
+				fields[index++] = nullColumn;
 			} else {
-				fields[i] = StringUtils.arrayAwareToString(field);
+				fields[index++] = StringUtils.arrayAwareToString(field);

Review comment:
       Change this to `List<String> fields` and `add` to it. Directly maintaining the `index` is sort of hard to read.




----------------------------------------------------------------
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 #12199: [FLINK-17774] [table] supports all kinds of changes for select result

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1618",
       "triggerID" : "3a1729c5513f3a86af9e6b9d0dec00325e375c7b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1678",
       "triggerID" : "f11005c6596ecf41efd898ba324374948b2eb8cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1722",
       "triggerID" : "d735316bc8301f79352fe1cc0d05d67d51b52766",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1787",
       "triggerID" : "cff8424e532db0bfc3ca58b8b6da13d3d69b0559",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1811",
       "triggerID" : "4ffe1d6e34ee30dbbc59fd59b77110a241391510",
       "triggerType" : "PUSH"
     }, {
       "hash" : "111f364a894466227faa44bb28c18884e5509b59",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1816",
       "triggerID" : "111f364a894466227faa44bb28c18884e5509b59",
       "triggerType" : "PUSH"
     }, {
       "hash" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1828",
       "triggerID" : "43ce2a929ab65202b2f09d0e4c867b6bfdd97cf1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1843",
       "triggerID" : "45e76bb4ec1dda3576b82ebe4ab9ddd96d7bb244",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=1861",
       "triggerID" : "7f7d4c37fb57c5caaa862226305c6994fe622898",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057",
       "triggerID" : "5b62118449cdf8d0de8d5b98781fdff9c2d0c571",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f07d136e61bd7024ccc58c9221f14d37ae7fb4b5",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f07d136e61bd7024ccc58c9221f14d37ae7fb4b5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5b62118449cdf8d0de8d5b98781fdff9c2d0c571 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=2057) 
   * f07d136e61bd7024ccc58c9221f14d37ae7fb4b5 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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