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/01/14 10:49:53 UTC

[GitHub] [shardingsphere] ReyYang opened a new pull request #14782: For #14733:PostgreSQL 14 bit data type are abnormal during full migration

ReyYang opened a new pull request #14782:
URL: https://github.com/apache/shardingsphere/pull/14782


   Fixes #14733.
   
   Changes proposed in this pull request:
   - Add isPgBitType method to PostgreSQLInventoryDumper class
   -
   -
   


-- 
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 commented on a change in pull request #14782: For #14733:PostgreSQL 14 bit data type are abnormal during full migration

Posted by GitBox <gi...@apache.org>.
sandynz commented on a change in pull request #14782:
URL: https://github.com/apache/shardingsphere/pull/14782#discussion_r785284109



##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/PostgreSQLInventoryDumper.java
##########
@@ -49,10 +52,26 @@ protected Object readValue(final ResultSet resultSet, final int index) throws SQ
         if (isPgMoneyType(resultSet, index)) {
             return resultSet.getBigDecimal(index);
         }
+        if (isPgBitType(resultSet, index)) {

Review comment:
       It could be on higher level, at `isPgMoneyType` and `isPgBitType` level. Refactor later.




-- 
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 commented on a change in pull request #14782: For #14733:PostgreSQL 14 bit data type are abnormal during full migration

Posted by GitBox <gi...@apache.org>.
sandynz commented on a change in pull request #14782:
URL: https://github.com/apache/shardingsphere/pull/14782#discussion_r785267901



##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/PostgreSQLInventoryDumper.java
##########
@@ -49,10 +52,26 @@ protected Object readValue(final ResultSet resultSet, final int index) throws SQ
         if (isPgMoneyType(resultSet, index)) {
             return resultSet.getBigDecimal(index);
         }
+        if (isPgBitType(resultSet, index)) {
+            PGobject pGobject = new PGobject();

Review comment:
       `pGobject` should be named to `result`

##########
File path: shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/PostgreSQLInventoryDumper.java
##########
@@ -49,10 +52,26 @@ protected Object readValue(final ResultSet resultSet, final int index) throws SQ
         if (isPgMoneyType(resultSet, index)) {
             return resultSet.getBigDecimal(index);
         }
+        if (isPgBitType(resultSet, index)) {

Review comment:
       It's better to check sqlType (java.sql.Types) first (like `getObject` impl in PG driver), to reduce unnecessary string comparison.




-- 
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] ReyYang commented on pull request #14782: For #14733:PostgreSQL 14 bit data type are abnormal during full migration

Posted by GitBox <gi...@apache.org>.
ReyYang commented on pull request #14782:
URL: https://github.com/apache/shardingsphere/pull/14782#issuecomment-1013012675


   Tested with varbit type no problem


-- 
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 #14782: For #14733:PostgreSQL 14 bit data type are abnormal during full migration

Posted by GitBox <gi...@apache.org>.
sandynz merged pull request #14782:
URL: https://github.com/apache/shardingsphere/pull/14782


   


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