apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.78k stars 3.29k forks source link

[Bug] Desc command does not display the table structure correctly #44426

Open wyxxxcat opened 3 days ago

wyxxxcat commented 3 days ago

Search before asking

Version

master

What's Wrong?

111 309ac210f13feead40618647ceffb628.png

What You Expected?

correct result

How to Reproduce?

CREATE TABLE if NOT EXISTS t
(
    `test` INT,
    `v` variant
)
ENGINE=OLAP
DUPLICATE KEY(`test`)
DISTRIBUTED BY HASH(test) BUCKETS 1
PROPERTIES (
    "replication_allocation" = "tag.location.default: 1",
    "binlog.enable" = "true",
    "variant_enable_flatten_nested" = "true"
);
curl -X POST -H "Content-Type: application/json" -d '{
    "name": "test",
    "src": {
    "host": "",
    "port": "",
    "thrift_port": "",
    "user": "root",
    "password": "",
    "database": "db_src",
    "table": ""
    },
    "dest": {
    "host": "",
    "port": "",
    "thrift_port": "",
    "user": "root",
    "password": "",
    "database": "db_dest",
    "table": ""
    }
}' http://127.0.0.1:9190/create_ccr
insert into t values(1, '{
  "eventId": 1,
  "firstName": "Name1",
  "lastName": "Eric",
  "body": {
    "phoneNumbers": [
      {
        "number": "1111111111",
        "type": "GSM",
        "callLimit": 5
      },
      {
        "number": "222222222",
        "type": "HOME",
        "callLimit": 3
      },
      {
        "number": "33333333",
        "callLimit": 2,
        "type": "WORK"
      }
    ]
  }
}');
use db_src;
select * from db_src;
set describe_extend_variant_column = true; 
desc t;
use db_dest;
select * from db_dest;
set describe_extend_variant_column = true; 
desc t;

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

eldenmoon commented 2 days ago

i will fix this issue