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 2021/06/25 09:34:59 UTC
[GitHub] [flink] Airblader opened a new pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Airblader opened a new pull request #16290:
URL: https://github.com/apache/flink/pull/16290
## What is the purpose of the change
This introduces `Table#executeInsert(TableDescriptor)` as part of FLIP-129. It is essentially a quality-of-life shortcut for registering the descriptor as an unnamed temporary table and then deffering to `executeInsert(String)`.
Documentation for now is using JavaDocs, more extensive documentation will be added in FLINK-23116.
## Brief change log
* Added `Table#executeInsert(TableDescriptor)`.
## Verifying this change
This change added tests and can be verified as follows:
* `CalcITCase#testExecuteInsertToTableDescriptor`
## 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)`: yes
- 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? yes
- If yes, how is the feature documented? JavaDocs
--
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] Airblader commented on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
Airblader commented on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868964269
@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.
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20075",
"triggerID" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"triggerType" : "PUSH"
}, {
"hash" : "5514f53dafc51df9c88857717e10cbb4504ecb74",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "5514f53dafc51df9c88857717e10cbb4504ecb74",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
* 8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20075)
* 5514f53dafc51df9c88857717e10cbb4504ecb74 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.
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571)
<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.
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ca3862e97e6a6eb383aa540c7b0288b91f9eb83f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540)
* 12b8b49b027c863b0d5108c65e138b4b958b5c4e 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 #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ca3862e97e6a6eb383aa540c7b0288b91f9eb83f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540)
* 12b8b49b027c863b0d5108c65e138b4b958b5c4e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543)
<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 #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
<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.
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20075",
"triggerID" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"triggerType" : "PUSH"
}, {
"hash" : "5514f53dafc51df9c88857717e10cbb4504ecb74",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20088",
"triggerID" : "5514f53dafc51df9c88857717e10cbb4504ecb74",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20075)
* 5514f53dafc51df9c88857717e10cbb4504ecb74 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20088)
<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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] twalthr commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r663849045
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
##########
@@ -1355,6 +1355,28 @@ default Table limit(int offset, int fetch) {
*/
TableResult executeInsert(String tablePath, boolean overwrite);
+ /**
+ * Declares that the pipeline defined by the given {@link Table} object should be written to a
+ * table defined by a {@link TableDescriptor}. It executes the insert operation.
Review comment:
side comment for the other `executeInsert` methods as well: explain that using the same descriptor will not lead to the same sink, we should recommend a statement set instead
##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/CalcITCase.scala
##########
@@ -548,4 +548,25 @@ class CalcITCase extends StreamingTestBase {
TestBaseUtils.compareResultAsText(result, "42")
}
+ @Test
+ def testExecuteInsertToTableDescriptor(): Unit = {
Review comment:
I think it is fine to use an ITCase here because we also trigger an execution but `Calc` is not a good location to find it again, maybe `org.apache.flink.table.planner.runtime.stream.table.TableSinkITCase`?
--
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 #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868379080
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 ca3862e97e6a6eb383aa540c7b0288b91f9eb83f (Fri Jun 25 09:48:47 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<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 #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ca3862e97e6a6eb383aa540c7b0288b91f9eb83f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540)
* 12b8b49b027c863b0d5108c65e138b4b958b5c4e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543)
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 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] twalthr closed pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
twalthr closed pull request #16290:
URL: https://github.com/apache/flink/pull/16290
--
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] Airblader commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
Airblader commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r665123901
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
##########
@@ -1355,6 +1355,28 @@ default Table limit(int offset, int fetch) {
*/
TableResult executeInsert(String tablePath, boolean overwrite);
+ /**
+ * Declares that the pipeline defined by the given {@link Table} object should be written to a
+ * table defined by a {@link TableDescriptor}. It executes the insert operation.
Review comment:
I added docs for now that note the behavior of registering the sink multiple times. I'm not sure I understand how a statement set solves this issue, though, at least using `StatementSet#addInsert(TableDescriptor, Table)` would have the same behavior, wouldn't it?
Ideally we'd probably avoid registering tables multiple times, and instead ensure that the same descriptor is only effectively registered once. But that'd require a solid/safe hash function that guarantees different values for different descriptors – or for the descriptor itself to generate a UUID which it exposes (yuck :-/)
--
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "CANCELED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 12b8b49b027c863b0d5108c65e138b4b958b5c4e Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543)
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
<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.
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ca3862e97e6a6eb383aa540c7b0288b91f9eb83f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540)
<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] twalthr commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r665208846
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
##########
@@ -1355,6 +1355,28 @@ default Table limit(int offset, int fetch) {
*/
TableResult executeInsert(String tablePath, boolean overwrite);
+ /**
+ * Declares that the pipeline defined by the given {@link Table} object should be written to a
+ * table defined by a {@link TableDescriptor}. It executes the insert operation.
Review comment:
What I meant was a general description statement set vs. executeInsert. Statement set has the benefit of inserting into the same table from multiple pipelines in a single execution. This is not well explained in this method. I will add a paragraph as a hotfix commit while merging.
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
##########
@@ -1355,6 +1355,33 @@ default Table limit(int offset, int fetch) {
*/
TableResult executeInsert(String tablePath, boolean overwrite);
+ /**
+ * Declares that the pipeline defined by the given {@link Table} object should be written to a
+ * table defined by a {@link TableDescriptor}. It executes the insert operation.
+ *
+ * <p>The {@link TableDescriptor descriptor} is registered as an inline (i.e. anonymous)
+ * temporary table (see {@link TableEnvironment#createTemporaryTable(String, TableDescriptor)})
+ * using a unique identifier. Note that calling this method multiple times, even with the same
+ * descriptor, results in multiple sinks being registered.
+ *
+ * <p>Examples:
+ *
+ * <pre>{@code
+ * Schema schema = Schema.newBuilder()
+ * .column("f0", DataTypes.STRING())
+ * .build();
+ *
+ * Table table = tableEnv.from(TableDescriptor.forConnector("datagen")
+ * .schema(schema)
+ * .build());
+ *
+ * table.executeInsert(TableDescriptor.forConnector("blackhole")
+ * .schema(schema)
+ * .build());
+ * }</pre>
+ */
+ TableResult executeInsert(TableDescriptor descriptor);
Review comment:
can you also add a `executeInsert(String tablePath, boolean overwrite)` descriptor method
--
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
* 8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3 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.
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
<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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] twalthr commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r663849045
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
##########
@@ -1355,6 +1355,28 @@ default Table limit(int offset, int fetch) {
*/
TableResult executeInsert(String tablePath, boolean overwrite);
+ /**
+ * Declares that the pipeline defined by the given {@link Table} object should be written to a
+ * table defined by a {@link TableDescriptor}. It executes the insert operation.
Review comment:
side comment for the other `executeInsert` methods as well: explain that using the same descriptor will not lead to the same sink, we should recommend a statement set instead
##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/CalcITCase.scala
##########
@@ -548,4 +548,25 @@ class CalcITCase extends StreamingTestBase {
TestBaseUtils.compareResultAsText(result, "42")
}
+ @Test
+ def testExecuteInsertToTableDescriptor(): Unit = {
Review comment:
I think it is fine to use an ITCase here because we also trigger an execution but `Calc` is not a good location to find it again, maybe `org.apache.flink.table.planner.runtime.stream.table.TableSinkITCase`?
--
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
} ]
}-->
## CI report:
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
<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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] Airblader commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
Airblader commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r658632028
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableDescriptorUtil.java
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.api.internal;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.api.TableDescriptor;
+import org.apache.flink.table.api.TableEnvironment;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** Utilities for working with {@link TableDescriptor}. */
+@Internal
+class TableDescriptorUtil {
Review comment:
(Currently duplicated from https://github.com/apache/flink/pull/16287)
--
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 #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ca3862e97e6a6eb383aa540c7b0288b91f9eb83f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540)
* 12b8b49b027c863b0d5108c65e138b4b958b5c4e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543)
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
<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] Airblader commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
Airblader commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r658632028
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableDescriptorUtil.java
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.table.api.internal;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.table.api.TableDescriptor;
+import org.apache.flink.table.api.TableEnvironment;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** Utilities for working with {@link TableDescriptor}. */
+@Internal
+class TableDescriptorUtil {
Review comment:
(Currently duplicated from https://github.com/apache/flink/pull/16287)
--
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] Airblader commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
Airblader commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r665123901
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
##########
@@ -1355,6 +1355,28 @@ default Table limit(int offset, int fetch) {
*/
TableResult executeInsert(String tablePath, boolean overwrite);
+ /**
+ * Declares that the pipeline defined by the given {@link Table} object should be written to a
+ * table defined by a {@link TableDescriptor}. It executes the insert operation.
Review comment:
I added docs for now that note the behavior of registering the sink multiple times. I'm not sure I understand how a statement set solves this issue, though, at least using `StatementSet#addInsert(TableDescriptor, Table)` would have the same behavior, wouldn't it?
Ideally we'd probably avoid registering tables multiple times, and instead ensure that the same descriptor is only effectively registered once. But that'd require a solid/safe hash function that guarantees different values for different descriptors – or for the descriptor itself to generate a unique identifier which it exposes (yuck :-/)
--
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20075",
"triggerID" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"triggerType" : "PUSH"
}, {
"hash" : "5514f53dafc51df9c88857717e10cbb4504ecb74",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20088",
"triggerID" : "5514f53dafc51df9c88857717e10cbb4504ecb74",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
* 8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20075)
* 5514f53dafc51df9c88857717e10cbb4504ecb74 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20088)
<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.
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 #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* ca3862e97e6a6eb383aa540c7b0288b91f9eb83f 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] Airblader commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
Airblader commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r658632504
##########
File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/sql/CalcITCase.scala
##########
@@ -548,4 +548,26 @@ class CalcITCase extends StreamingTestBase {
TestBaseUtils.compareResultAsText(result, "42")
}
+ @Test
+ def testExecuteInsertToTableDescriptor(): Unit = {
+ val schema = Schema.newBuilder()
+ .column("f0", DataTypes.INT())
+ .build();
+
+ val tableId = TestValuesTableFactory.registerData(Seq(row(42)))
+ tEnv.createTemporaryTable("T", TableDescriptor.forConnector("values")
+ .schema(schema)
+ .option("data-id", tableId)
+ .option("bounded", "true")
+ .build())
+
+ val tableResult = tEnv.from("T").executeInsert(TableDescriptor.forConnector("values")
+ .schema(schema)
+ .build())
+
+ tableResult.await()
+ // TODO FLINK-23067 This only works if the test is run in isolation
+ assertEquals(Seq("42"), TestValuesTableFactory.getResults("Unnamed_TableDescriptor$1").toList)
Review comment:
I'll need to figure out a way to do this still. An easy answer would be to allow setting the counter in `TableDescriptorUtil` and fixing it to a specific number, but I want to see if there's something better.
--
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 #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868379080
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 5514f53dafc51df9c88857717e10cbb4504ecb74 (Thu Sep 23 17:59:22 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<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.
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 edited a comment on pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #16290:
URL: https://github.com/apache/flink/pull/16290#issuecomment-868395028
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19540",
"triggerID" : "ca3862e97e6a6eb383aa540c7b0288b91f9eb83f",
"triggerType" : "PUSH"
}, {
"hash" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19543",
"triggerID" : "12b8b49b027c863b0d5108c65e138b4b958b5c4e",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"triggerType" : "PUSH"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "f7d3d618d7f73fceabe136cefeda2cb210f1d463",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545",
"triggerID" : "868964269",
"triggerType" : "MANUAL"
}, {
"hash" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20075",
"triggerID" : "8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f7d3d618d7f73fceabe136cefeda2cb210f1d463 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19571) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=19545)
* 8c227fe9dcc5ddd7086d3c13b5faafa38a4884e3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=20075)
<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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] twalthr commented on a change in pull request #16290: [FLINK-23067][table-api-java] Introduce Table#executeInsert(TableDescriptor)
Posted by GitBox <gi...@apache.org>.
twalthr commented on a change in pull request #16290:
URL: https://github.com/apache/flink/pull/16290#discussion_r665209323
##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/Table.java
##########
@@ -1355,6 +1355,33 @@ default Table limit(int offset, int fetch) {
*/
TableResult executeInsert(String tablePath, boolean overwrite);
+ /**
+ * Declares that the pipeline defined by the given {@link Table} object should be written to a
+ * table defined by a {@link TableDescriptor}. It executes the insert operation.
+ *
+ * <p>The {@link TableDescriptor descriptor} is registered as an inline (i.e. anonymous)
+ * temporary table (see {@link TableEnvironment#createTemporaryTable(String, TableDescriptor)})
+ * using a unique identifier. Note that calling this method multiple times, even with the same
+ * descriptor, results in multiple sinks being registered.
+ *
+ * <p>Examples:
+ *
+ * <pre>{@code
+ * Schema schema = Schema.newBuilder()
+ * .column("f0", DataTypes.STRING())
+ * .build();
+ *
+ * Table table = tableEnv.from(TableDescriptor.forConnector("datagen")
+ * .schema(schema)
+ * .build());
+ *
+ * table.executeInsert(TableDescriptor.forConnector("blackhole")
+ * .schema(schema)
+ * .build());
+ * }</pre>
+ */
+ TableResult executeInsert(TableDescriptor descriptor);
Review comment:
can you also add a `executeInsert(boolean overwrite)` descriptor method
--
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