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] Automatically specifying tablet when create table #10614

Merged
merged 4 commits into from
Sep 15, 2022

Commits on Sep 15, 2022

  1. [Feature] Automatically create tablet when create table

    Specfiy the tablet num when create table is very noisy.
    Many users can not know how to give a right hint.
    The pull request try to eliminate the pain to specify the num.
    
    1. If the table is created from scratch, the tablet num will be
    equal to the number of backends.
    ```
    CREATE TABLE `test_table2` (
        `pk1` bigint(20) NOT NULL COMMENT "",
        `pk2` date NOT NULL COMMENT "",
        `v0` varchar(65533) NOT NULL COMMENT ""
    ) ENGINE=OLAP
    PRIMARY KEY(`pk1`, `pk2`)
    DISTRIBUTED BY HASH(`pk1`)
    ```
    
    2. Add partition will use the last five partition size to calculate the tablet num.
    ```
    ALTER TABLE test_table2 add partition p20220811 values less than("2022-08-11")
    ```
    The num = total_size_of_last_five_partition / 10GB
    chaoyli committed Sep 15, 2022
    Configuration menu
    Copy the full SHA
    22bd079 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    abcadf2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5bdc2b7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3338273 View commit details
    Browse the repository at this point in the history