You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "azexcy (via GitHub)" <gi...@apache.org> on 2023/08/08 03:14:09 UTC

[GitHub] [shardingsphere] azexcy opened a new pull request, #27983: Refactor StandardPipelineTableMetaDataLoaderTest, use H2 to do real test

azexcy opened a new pull request, #27983:
URL: https://github.com/apache/shardingsphere/pull/27983

   
   
   Changes proposed in this pull request:
     - Refactor StandardPipelineTableMetaDataLoaderTest use H2 to do real test
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
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] sandynz merged pull request #27983: Refactor StandardPipelineTableMetaDataLoaderTest, use H2 to do real test

Posted by "sandynz (via GitHub)" <gi...@apache.org>.
sandynz merged PR #27983:
URL: https://github.com/apache/shardingsphere/pull/27983


-- 
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] azexcy commented on pull request #27983: Refactor StandardPipelineTableMetaDataLoaderTest, use H2 to do real test

Posted by "azexcy (via GitHub)" <gi...@apache.org>.
azexcy commented on PR #27983:
URL: https://github.com/apache/shardingsphere/pull/27983#issuecomment-1668865510

   The primary key will have a unique index
   
   MySQL 
   
   ```
   mysql> CREATE TABLE t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(50), PRIMARY KEY (order_id))
   
   mysql> describe t_order;
   +----------+-------------+------+-----+---------+-------+
   | Field    | Type        | Null | Key | Default | Extra |
   +----------+-------------+------+-----+---------+-------+
   | order_id | int         | NO   | PRI | NULL    |       |
   | user_id  | int         | NO   |     | NULL    |       |
   | status   | varchar(50) | YES  |     | NULL    |       |
   +----------+-------------+------+-----+---------+-------+
   3 rows in set (0.01 sec)
   
   mysql> SHOW INDEX FROM t_order;
   +---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
   | Table   | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression |
   +---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
   | t_order |          0 | PRIMARY  |            1 | order_id    | A         |           0 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
   +---------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
   1 row in set (0.01 sec)
   ```
   
   
   PostgreSQL
   
   ```
   create table t_order (
     order_id integer primary key ,
     user_id integer not null,
     status character varying(255)
   );
   
   postgres=# \c ds_0
   You are now connected to database "ds_0" as user "aze".
   ds_0=# \d t_order
                          Table "public.t_order"
     Column  |          Type          | Collation | Nullable | Default
   ----------+------------------------+-----------+----------+---------
    order_id | integer                |           | not null |
    user_id  | integer                |           | not null |
    status   | character varying(255) |           |          |
   Indexes:
       "t_order_pkey" PRIMARY KEY, btree (order_id)
   
   ds_0=# SELECT * FROM pg_indexes WHERE tablename = 't_order';
    schemaname | tablename |  indexname   | tablespace |                                 indexdef
   ------------+-----------+--------------+------------+---------------------------------------------------------------------------
    public     | t_order   | t_order_pkey |            | CREATE UNIQUE INDEX t_order_pkey ON public.t_order USING btree (order_id)
   (1 row)
   
   ds_0=#
   ```
   


-- 
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