Giter Club home page Giter Club logo

Comments (5)

WenyXu avatar WenyXu commented on June 10, 2024 1

How about having a try with gtctl

I tried it and playground in greptimecloud, but create table was successfully created. (playground in greptimecloud has 3 regions.) Am I missing something?

Reproduction

CREATE TABLE test_table (
    a INT PRIMARY KEY,
    ts TIMESTAMP TIME INDEX
) PARTITION BY RANGE COLUMNS(a) (
    PARTITION r0 VALUES LESS THAN (10),
    PARTITION r1 VALUES LESS THAN (20),
    PARTITION r2 VALUES LESS THAN (MAXVALUE),
);

Then

CREATE TABLE if not exists test_table (
    a INT PRIMARY KEY,
    ts TIMESTAMP TIME INDEX
) PARTITION BY RANGE COLUMNS(a) (
    PARTITION r0 VALUES LESS THAN (10),
    PARTITION r1 VALUES LESS THAN (20),
    PARTITION r2 VALUES LESS THAN (MAXVALUE),
);

Link

https://greptime.com/product/cloud

Hi @NiwakaDev , Thank you for your report. The cloud service may not use the latest version. I'll double-check it later.

from greptimedb.

NiwakaDev avatar NiwakaDev commented on June 10, 2024

I'd like to address this issue, but I don't know how to make a test which can reproduce it.

I tried to reproduce this issue, like so:

    #[tokio::test(flavor = "multi_thread")]
    async fn test_issue2128() {
        common_telemetry::init_default_ut_logging();

        let instance =
            tests::create_distributed_instance("test_distributed_insert_delete_and_query").await;
        let frontend = instance.frontend();
        let frontend = frontend.as_ref();

        let table_name = "my_dist_table";
        let sql = format!(
            r"
CREATE TABLE {table_name} (
    a INT,
    ts TIMESTAMP,
    TIME INDEX (ts)
) PARTITION BY RANGE COLUMNS(a) (
    PARTITION r0 VALUES LESS THAN (10),
    PARTITION r1 VALUES LESS THAN (20),
    PARTITION r2 VALUES LESS THAN (50),
    PARTITION r3 VALUES LESS THAN (MAXVALUE),
)"
        );
        create_table(frontend, sql).await;
        let sql = format!(
            r"
CREATE TABLE if not exists {table_name} (
    a INT,
    ts TIMESTAMP,
    TIME INDEX (ts)
) PARTITION BY RANGE COLUMNS(a) (
    PARTITION r0 VALUES LESS THAN (10),
    PARTITION r1 VALUES LESS THAN (20),
    PARTITION r2 VALUES LESS THAN (50),
    PARTITION r3 VALUES LESS THAN (MAXVALUE),
)"
        );
        create_table(frontend, sql).await;

    //

And then I executed cargo nextest run test_issue2128
But, the above test seems to pass.

from greptimedb.

WenyXu avatar WenyXu commented on June 10, 2024

How about having a try with gtctl

from greptimedb.

NiwakaDev avatar NiwakaDev commented on June 10, 2024

How about having a try with gtctl

I tried it and playground in greptimecloud, but create table was successfully created. (playground in greptimecloud has 3 regions.) Am I missing something?

Reproduction

CREATE TABLE test_table (
    a INT PRIMARY KEY,
    ts TIMESTAMP TIME INDEX
) PARTITION BY RANGE COLUMNS(a) (
    PARTITION r0 VALUES LESS THAN (10),
    PARTITION r1 VALUES LESS THAN (20),
    PARTITION r2 VALUES LESS THAN (MAXVALUE),
);

Then

CREATE TABLE if not exists test_table (
    a INT PRIMARY KEY,
    ts TIMESTAMP TIME INDEX
) PARTITION BY RANGE COLUMNS(a) (
    PARTITION r0 VALUES LESS THAN (10),
    PARTITION r1 VALUES LESS THAN (20),
    PARTITION r2 VALUES LESS THAN (MAXVALUE),
);

Link

https://greptime.com/product/cloud

from greptimedb.

MichaelScofield avatar MichaelScofield commented on June 10, 2024

Verified, it's gone in v0.4

from greptimedb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.