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 2022/09/20 03:33:15 UTC

[GitHub] [flink] Tartarus0zm opened a new pull request, #20858: [FLINK-29219][table]fix CREATE TABLE AS statement blocks SQL client's execution

Tartarus0zm opened a new pull request, #20858:
URL: https://github.com/apache/flink/pull/20858

   ## What is the purpose of the change
   
   * fix CTAS statement blocks SQL client's execution
   
   
   ## Brief change log
   
   `ContextResolvedTable` objects are constructed manually and not obtained using `CatalogManager`.
   
   
   ## Verifying this change
   
    * The change was verified manually by using sql-client.sh to execute the CTAS statement with `table.dml-sync=false` then the sql client was not blocked.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] lsyldliu commented on pull request #20858: [FLINK-29219][table]fix CREATE TABLE AS statement blocks SQL client's execution

Posted by GitBox <gi...@apache.org>.
lsyldliu commented on PR #20858:
URL: https://github.com/apache/flink/pull/20858#issuecomment-1255719282

   @Tartarus0zm close this pr?


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] Tartarus0zm commented on pull request #20858: [FLINK-29219][table]fix CREATE TABLE AS statement blocks SQL client's execution

Posted by GitBox <gi...@apache.org>.
Tartarus0zm commented on PR #20858:
URL: https://github.com/apache/flink/pull/20858#issuecomment-1255770862

   @lsyldliu  ok, thanks for your work


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] Tartarus0zm closed pull request #20858: [FLINK-29219][table]fix CREATE TABLE AS statement blocks SQL client's execution

Posted by GitBox <gi...@apache.org>.
Tartarus0zm closed pull request #20858: [FLINK-29219][table]fix CREATE TABLE AS statement blocks SQL client's execution
URL: https://github.com/apache/flink/pull/20858


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] lsyldliu commented on a diff in pull request #20858: [FLINK-29219][table]fix CREATE TABLE AS statement blocks SQL client's execution

Posted by GitBox <gi...@apache.org>.
lsyldliu commented on code in PR #20858:
URL: https://github.com/apache/flink/pull/20858#discussion_r975004456


##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/ddl/CreateTableASOperation.java:
##########
@@ -38,25 +38,28 @@ public class CreateTableASOperation implements CreateOperation {
     private final Map<String, String> sinkModifyStaticPartitions;
     private final QueryOperation sinkModifyQuery;
     private final boolean sinkModifyOverwrite;
+    private final ContextResolvedTable contextResolvedTable;
 
     public CreateTableASOperation(
             CreateTableOperation createTableOperation,
             Map<String, String> sinkModifyStaticPartitions,
             QueryOperation sinkModifyQuery,
-            boolean sinkModifyOverwrite) {
+            boolean sinkModifyOverwrite,
+            ContextResolvedTable contextResolvedTable) {
         this.createTableOperation = createTableOperation;
         this.sinkModifyStaticPartitions = sinkModifyStaticPartitions;
         this.sinkModifyQuery = sinkModifyQuery;
         this.sinkModifyOverwrite = sinkModifyOverwrite;
+        this.contextResolvedTable = contextResolvedTable;
     }
 
     public CreateTableOperation getCreateTableOperation() {
         return createTableOperation;
     }
 
-    public SinkModifyOperation toSinkModifyOperation(CatalogManager catalogManager) {
+    public SinkModifyOperation toSinkModifyOperation() {

Review Comment:
   Please revert the changes in this class, it is no need now.



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/operations/SqlCreateTableConverter.java:
##########
@@ -121,8 +121,13 @@ Operation convertCreateTableAS(
                         sqlCreateTableAs.isIfNotExists(),
                         sqlCreateTableAs.isTemporary());
 
+        ContextResolvedTable contextResolvedTable =

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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #20858: [FLINK-29219][table]fix CREATE TABLE AS statement blocks SQL client's execution

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "ba347c7d86180efd6572d5d3ee6ed732eeb088ee",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ba347c7d86180efd6572d5d3ee6ed732eeb088ee",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ba347c7d86180efd6572d5d3ee6ed732eeb088ee UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] lsyldliu commented on pull request #20858: [FLINK-29219][table]fix CREATE TABLE AS statement blocks SQL client's execution

Posted by GitBox <gi...@apache.org>.
lsyldliu commented on PR #20858:
URL: https://github.com/apache/flink/pull/20858#issuecomment-1253350377

   Let's continue this work in https://github.com/apache/flink/pull/20869.


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org