Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support REPLACE TABLE operation. #4669

Merged
merged 4 commits into from
Oct 13, 2020

Conversation

morningman
Copy link
Contributor

Proposed changes

Implement REPLACE TABLE feature.
Details can be found in document alter-table-replace-table.md

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have create an issue on (Fix [Proposal] Support replace table feature #4668), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If this change need a document change, I have updated the document

@morningman morningman added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 24, 2020
@morningman morningman force-pushed the unpartition_temp_partition branch from adb603d to 3a6aacc Compare September 25, 2020 02:45
@morningman morningman self-assigned this Sep 25, 2020

如果 `swap` 参数为 `true`,则替换后,名称为 `tbl1` 表中的数据为原 `tbl2` 表中的数据。而名称为 `tbl2` 表中的数据为原 `tbl1` 表中的数据。即两张表数据发生了互换。

如果 `swap` 参数为 `true`,则替换后,名称为 `tbl1` 表中的数据为原 `tbl2` 表中的数据。而名称为 `tbl2` 表被删除。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be false ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


If the `swap` parameter is `true`, after replacement, the data in the table named `tbl1` is the data in the original `tbl2` table. The data in the table named `tbl2` is the data in the original table `tbl1`. That is, the data of the two tables are interchanged.

If the `swap` parameter is `true`, after replacement, the data in the table named `tbl1` is the data in the original `tbl2` table. The table named `tbl2` is dropped.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Member

@yangzhg yangzhg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@yangzhg yangzhg added the approved Indicates a PR has been approved by one committer. label Oct 12, 2020
@morningman morningman merged commit 3f0cb04 into apache:master Oct 13, 2020
caoyang10 pushed a commit to caoyang10/incubator-doris that referenced this pull request Oct 29, 2020
Implement REPLACE TABLE feature.
Details can be found in document `alter-table-replace-table.md`
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Proposal] Support replace table feature
3 participants