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/06/28 12:28:50 UTC

[GitHub] [shardingsphere] lcxywfe opened a new pull request, #18665: add POLYGON metadata

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

   Append to #18614.
   
   Changes proposed in this pull request:
   - support POLYGON metadata
   Just followed #18649 


-- 
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] mabaiwan commented on a diff in pull request #18665: add POLYGON metadata

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


##########
shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/MySQLSchemaMetaDataLoaderTest.java:
##########
@@ -88,12 +88,12 @@ private ResultSet mockTypeInfoResultSet() throws SQLException {
     
     private ResultSet mockTableMetaDataResultSet() throws SQLException {
         ResultSet result = mock(ResultSet.class);
-        when(result.next()).thenReturn(true, true, true, true, true, true, false);
+        when(result.next()).thenReturn(true, true, true, true, true, true, true, false);
         when(result.getString("TABLE_NAME")).thenReturn("tbl");
-        when(result.getString("COLUMN_NAME")).thenReturn("id", "name", "doc", "geo", "t_year", "mp");
-        when(result.getString("DATA_TYPE")).thenReturn("int", "varchar", "json", "geometry", "year", "multipolygon");
-        when(result.getString("COLUMN_KEY")).thenReturn("PRI", "", "", "", "", "");
-        when(result.getString("EXTRA")).thenReturn("auto_increment", "", "", "", "", "");
+        when(result.getString("COLUMN_NAME")).thenReturn("id", "name", "doc", "geo", "t_year", "pg", "mpg");

Review Comment:
   @lcxywfe Why change from mp to mpg?



-- 
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] mabaiwan commented on a diff in pull request #18665: add POLYGON metadata

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


##########
shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/MySQLSchemaMetaDataLoaderTest.java:
##########
@@ -88,12 +88,12 @@ private ResultSet mockTypeInfoResultSet() throws SQLException {
     
     private ResultSet mockTableMetaDataResultSet() throws SQLException {
         ResultSet result = mock(ResultSet.class);
-        when(result.next()).thenReturn(true, true, true, true, true, true, false);
+        when(result.next()).thenReturn(true, true, true, true, true, true, true, false);
         when(result.getString("TABLE_NAME")).thenReturn("tbl");
-        when(result.getString("COLUMN_NAME")).thenReturn("id", "name", "doc", "geo", "t_year", "mp");
-        when(result.getString("DATA_TYPE")).thenReturn("int", "varchar", "json", "geometry", "year", "multipolygon");
-        when(result.getString("COLUMN_KEY")).thenReturn("PRI", "", "", "", "", "");
-        when(result.getString("EXTRA")).thenReturn("auto_increment", "", "", "", "", "");
+        when(result.getString("COLUMN_NAME")).thenReturn("id", "name", "doc", "geo", "t_year", "pg", "mpg");

Review Comment:
   @lcxywfe Why change from mg to mpg?



-- 
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] lcxywfe commented on pull request #18665: add POLYGON metadata

Posted by GitBox <gi...@apache.org>.
lcxywfe commented on PR #18665:
URL: https://github.com/apache/shardingsphere/pull/18665#issuecomment-1168663004

   @zjcnb Please help review, thx.


-- 
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] zjcnb commented on pull request #18665: add POLYGON metadata

Posted by GitBox <gi...@apache.org>.
zjcnb commented on PR #18665:
URL: https://github.com/apache/shardingsphere/pull/18665#issuecomment-1168780213

   > @zjcnb Please help review, thx.
   
   The CI has error, fix it please


-- 
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] lcxywfe commented on a diff in pull request #18665: add POLYGON metadata

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


##########
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/MySQLSchemaMetaDataLoader.java:
##########
@@ -126,6 +126,7 @@ private void appendDataTypes(final Map<String, Integer> dataTypes) {
         dataTypes.putIfAbsent("GEOMETRY", Types.BINARY);
         dataTypes.putIfAbsent("YEAR", Types.DATE);
         dataTypes.putIfAbsent("MULTIPOINT", -2);
+        dataTypes.putIfAbsent("POLYGON", -2);

Review Comment:
   DONE



##########
shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/MySQLSchemaMetaDataLoaderTest.java:
##########
@@ -88,12 +88,12 @@ private ResultSet mockTypeInfoResultSet() throws SQLException {
     
     private ResultSet mockTableMetaDataResultSet() throws SQLException {
         ResultSet result = mock(ResultSet.class);
-        when(result.next()).thenReturn(true, true, true, true, true, true, false);
+        when(result.next()).thenReturn(true, true, true, true, true, true, true, false);
         when(result.getString("TABLE_NAME")).thenReturn("tbl");
-        when(result.getString("COLUMN_NAME")).thenReturn("id", "name", "doc", "geo", "t_year", "mp");
-        when(result.getString("DATA_TYPE")).thenReturn("int", "varchar", "json", "geometry", "year", "multipolygon");
-        when(result.getString("COLUMN_KEY")).thenReturn("PRI", "", "", "", "", "");
-        when(result.getString("EXTRA")).thenReturn("auto_increment", "", "", "", "", "");
+        when(result.getString("COLUMN_NAME")).thenReturn("id", "name", "doc", "geo", "t_year", "pg", "mpg");

Review Comment:
   For aligning to ```pg```



-- 
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] mabaiwan commented on a diff in pull request #18665: add POLYGON metadata

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


##########
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/metadata/database/schema/loader/dialect/MySQLSchemaMetaDataLoader.java:
##########
@@ -126,6 +126,7 @@ private void appendDataTypes(final Map<String, Integer> dataTypes) {
         dataTypes.putIfAbsent("GEOMETRY", Types.BINARY);
         dataTypes.putIfAbsent("YEAR", Types.DATE);
         dataTypes.putIfAbsent("MULTIPOINT", -2);
+        dataTypes.putIfAbsent("POLYGON", -2);

Review Comment:
   @lcxywfe You can use `Types.BINARY` replacement `-2`.



-- 
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 merged pull request #18665: add POLYGON metadata

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


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