You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/28 02:54:50 UTC

[GitHub] [doris] nextdreamblue opened a new issue, #10463: [Bug] create table like when having sequence column

nextdreamblue opened a new issue, #10463:
URL: https://github.com/apache/doris/issues/10463

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   master
   
   ### What's Wrong?
   
   When i create table A like B which has sequence column, i do not get table A with sequence column.
   
   
   ### What You Expected?
   
   I want get table A with sequence column.
   
   ### How to Reproduce?
   
   Reproduce it like this:
   
   MySQL [test]> CREATE TABLE table_a
       -> (
       ->     k1 BIGINT,
       ->     k2 LARGEINT,
       ->     v1 VARCHAR(2048),
       ->     v2 SMALLINT DEFAULT "10"
       -> )
       -> UNIQUE KEY(k1)
       -> DISTRIBUTED BY HASH (k1) BUCKETS 32
       -> PROPERTIES(
       -> "replication_num" = "1",
       ->     "function_column.sequence_type" = 'LARGEINT'
       -> );
   Query OK, 0 rows affected (0.06 sec)
   
   MySQL [test]> show create table table_a;
   +---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | Table   | Create Table                                                                                                                                                                                                                                                                                                                                                                                  |
   +---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | table_a | CREATE TABLE `table_a` (
     `k1` bigint(20) NULL COMMENT "",
     `k2` largeint(40) NULL COMMENT "",
     `v1` varchar(2048) NULL COMMENT "",
     `v2` smallint(6) NULL DEFAULT "10" COMMENT ""
   ) ENGINE=OLAP
   UNIQUE KEY(`k1`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`k1`) BUCKETS 32
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2"
   ) |
   +---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   1 row in set (0.00 sec)
   
   MySQL [test]> set show_hidden_columns=true;
   Query OK, 0 rows affected (0.01 sec)
   
   MySQL [test]> show create table table_a;
   +---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | Table   | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   +---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | table_a | CREATE TABLE `table_a` (
     `k1` bigint(20) NULL COMMENT "",
     `k2` largeint(40) NULL COMMENT "",
     `v1` varchar(2048) NULL COMMENT "",
     `v2` smallint(6) NULL DEFAULT "10" COMMENT "",
     `__DORIS_DELETE_SIGN__` tinyint(4) NOT NULL DEFAULT "0" COMMENT "doris delete flag hidden column",
     `__DORIS_SEQUENCE_COL__` largeint(40) NULL COMMENT "sequence column hidden column"
   ) ENGINE=OLAP
   UNIQUE KEY(`k1`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`k1`) BUCKETS 32
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2"
   ) |
   +---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   1 row in set (0.00 sec)
   
   MySQL [test]> 
   MySQL [test]> 
   MySQL [test]> create table table_b like table_a;
   Query OK, 0 rows affected (0.03 sec)
   
   MySQL [test]> show create table table_b;
   +---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | Table   | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
   +---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | table_b | CREATE TABLE `table_b` (
     `k1` bigint(20) NULL COMMENT "",
     `k2` largeint(40) NULL COMMENT "",
     `v1` varchar(2048) NULL COMMENT "",
     `v2` smallint(6) NULL DEFAULT "10" COMMENT "",
     `__DORIS_DELETE_SIGN__` tinyint(4) NOT NULL DEFAULT "0" COMMENT "doris delete flag hidden column"
   ) ENGINE=OLAP
   UNIQUE KEY(`k1`)
   COMMENT "OLAP"
   DISTRIBUTED BY HASH(`k1`) BUCKETS 32
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2"
   ) |
   +---------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   1 row in set (0.00 sec)
   
   
   I can not get table_b with sequence column hidden column "__DORIS_SEQUENCE_COL__".
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman closed issue #10463: [Bug] create table like when having sequence column

Posted by GitBox <gi...@apache.org>.
morningman closed issue #10463: [Bug] create table like when having sequence column
URL: https://github.com/apache/doris/issues/10463


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org