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 2022/04/15 10:02:44 UTC

[GitHub] [shardingsphere] yx9o opened a new pull request, #16868: Add sharding algorithm example.

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

   Add Interval Sharding Algorithm example.
   
   ![2b7a1609e4566fe2ba539792ca362f5](https://user-images.githubusercontent.com/12792261/163557789-01ca01b6-862d-42f6-bc46-2ae9c46fd442.png)
   ![1d2fa6ebf0a04ad5c67f92634dfa20d](https://user-images.githubusercontent.com/12792261/163557797-aa67174d-9a0d-43ba-bf88-aedf47c5c6fa.png)
   


-- 
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] RaigorJiang commented on a diff in pull request #16868: Add sharding algorithm example.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #16868:
URL: https://github.com/apache/shardingsphere/pull/16868#discussion_r851646386


##########
examples/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/OrderStatisticsInfo.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class OrderStatisticsInfo implements Serializable {
+    
+    private static final long serialVersionUID = -1770007969944794302L;
+    
+    private Long id;
+    
+    private Long userId;
+    
+    private Date orderDate;
+    
+    private int orderNum;
+    
+    public Long getId() {

Review Comment:
   Hi @yx9o , can we use lombok to generate getters and setters?



-- 
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] yx9o commented on a diff in pull request #16868: Add sharding algorithm example.

Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #16868:
URL: https://github.com/apache/shardingsphere/pull/16868#discussion_r851690287


##########
examples/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/OrderStatisticsInfo.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class OrderStatisticsInfo implements Serializable {
+    
+    private static final long serialVersionUID = -1770007969944794302L;
+    
+    private Long id;
+    
+    private Long userId;
+    
+    private Date orderDate;

Review Comment:
   ok



-- 
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] RaigorJiang merged pull request #16868: Add sharding algorithm example.

Posted by GitBox <gi...@apache.org>.
RaigorJiang merged PR #16868:
URL: https://github.com/apache/shardingsphere/pull/16868


-- 
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] yx9o commented on a diff in pull request #16868: Add sharding algorithm example.

Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #16868:
URL: https://github.com/apache/shardingsphere/pull/16868#discussion_r851693400


##########
examples/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/OrderStatisticsInfo.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class OrderStatisticsInfo implements Serializable {
+    
+    private static final long serialVersionUID = -1770007969944794302L;
+    
+    private Long id;
+    
+    private Long userId;
+    
+    private Date orderDate;
+    
+    private int orderNum;
+    
+    public Long getId() {

Review Comment:
   done



-- 
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] RaigorJiang commented on a diff in pull request #16868: Add sharding algorithm example.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #16868:
URL: https://github.com/apache/shardingsphere/pull/16868#discussion_r851646764


##########
examples/example-core/example-api/src/main/java/org/apache/shardingsphere/example/core/api/entity/OrderStatisticsInfo.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.core.api.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class OrderStatisticsInfo implements Serializable {
+    
+    private static final long serialVersionUID = -1770007969944794302L;
+    
+    private Long id;
+    
+    private Long userId;
+    
+    private Date orderDate;

Review Comment:
   Since ShardingSphere is already based on Java8, I recommend to use LocalDateTime instead of Date.



-- 
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] codecov-commenter commented on pull request #16868: Add sharding algorithm example.

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #16868:
URL: https://github.com/apache/shardingsphere/pull/16868#issuecomment-1100723804

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16868?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16868](https://codecov.io/gh/apache/shardingsphere/pull/16868?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (84b50ce) into [master](https://codecov.io/gh/apache/shardingsphere/commit/dd97086107831f66577b90ffd99ac640779645a8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dd97086) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff            @@
   ##             master   #16868   +/-   ##
   =========================================
     Coverage     60.16%   60.16%           
     Complexity     2128     2128           
   =========================================
     Files          3445     3445           
     Lines         51712    51712           
     Branches       8830     8830           
   =========================================
     Hits          31114    31114           
     Misses        17983    17983           
     Partials       2615     2615           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16868?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/16868?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dd97086...84b50ce](https://codecov.io/gh/apache/shardingsphere/pull/16868?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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