You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/29 03:19:05 UTC

[GitHub] [shardingsphere] tuichenchuxin opened a new issue #12805: Tabe meta data load columns is not ordered as table column original order.

tuichenchuxin opened a new issue #12805:
URL: https://github.com/apache/shardingsphere/issues/12805


   When i use mysql, I have a table like 
   ```
   create table t_order_0
   (
       order_id    int         not null
           primary key,
       user_id     int         not null,
       status      varchar(45) null,
       create_time datetime    null
   );
   ```
   But when i load this table, then found that tableMetadata columns order is 
   `TableMetaData(columnNames=[create_time, order_id, status, user_id])`
   the order is different from original table.
   
   ## What problem does this cause
   If i insert into this table 
   `insert into t_order values(10,2,2,'2021-03-01');`
   And i have user_id as sharding column
   Then I'll get a error. Because `2021-03-01` can't be sharded as a user_id.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] terrymanu closed issue #12805: Tabe meta data load columns is not ordered as table column original order.

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #12805:
URL: https://github.com/apache/shardingsphere/issues/12805


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] terrymanu closed issue #12805: Tabe meta data load columns is not ordered as table column original order.

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #12805:
URL: https://github.com/apache/shardingsphere/issues/12805


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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