[
https://issues.apache.org/jira/browse/FLINK-32787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17762343#comment-17762343
]
Feng Jin commented on FLINK-32787:
----------------------------------
[~luoyuxia]
Currently, this issue is encountered in non-atomic scenarios. From the code, it
can be seen that the table will first be dropped. Since my test involves a
temporary table, dropping the table does not delete the actual file.
!image-2023-09-06-18-55-59-095.png!
When constructing DataStreamSink, overwrite is not enabled by default, so the
original files are not cleared.
In CTAS scenarios, it is reasonable to not enable overwrite by default, so this
behavior should meet expectations.
!image-2023-09-06-18-56-15-596.png!
However, to avoid user confusion, I suggest documenting this behavior in the
documentation.
In the future, I think we can also add relevant configurations for users to
control whether CTAS should use overwrite.
cc [~tartarus]
> Release Testing: Verify FLIP-305: Support atomic for CREATE TABLE AS
> SELECT(CTAS) statement
> -------------------------------------------------------------------------------------------
>
> Key: FLINK-32787
> URL: https://issues.apache.org/jira/browse/FLINK-32787
> Project: Flink
> Issue Type: Sub-task
> Components: Tests
> Affects Versions: 1.18.0
> Reporter: Qingsheng Ren
> Assignee: Feng Jin
> Priority: Major
> Fix For: 1.18.0
>
> Attachments: image-2023-08-22-19-20-23-490.png,
> image-2023-08-30-19-28-28-420.png, image-2023-08-30-19-28-36-709.png,
> image-2023-08-30-19-28-44-721.png, image-2023-09-06-18-55-59-095.png,
> image-2023-09-06-18-56-15-596.png, 截屏2023-08-30 19.24.57.png
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)