sunbufu commented on a change in pull request #2668: add `getValueByColumnType` 
method
URL: 
https://github.com/apache/incubator-shardingsphere/pull/2668#discussion_r300925257
 
 

 ##########
 File path: 
sharding-core/sharding-core-execute/src/main/java/org/apache/shardingsphere/core/execute/sql/execute/result/StreamQueryResult.java
 ##########
 @@ -68,12 +68,12 @@ public boolean next() throws SQLException {
     
     @Override
     public Object getValue(final int columnIndex, final Class<?> type) throws 
SQLException {
-        return decrypt(columnIndex, QueryResultUtil.getValue(resultSet, 
columnIndex));
+        return decrypt(columnIndex, QueryResultUtil.getValue(resultSet, 
columnIndex, type));
 
 Review comment:
   > StreamQueryResult pass the type to getValue(), but what about 
MemoryQueryResult?
   
   This is why I doesn't deleted `QueryResultUtil.getValueByColumnType()`, I 
just have overload a `getValue()` method with `Class<?> type` in 
`QueryResultUtil`,  `StreamQueryResult` will call the new `getValue()` with 
`Class<?> type`, and `MemoryQueryResult ` will continue to call the old 
`getValue()`.
   ![StreamQueryResult call the new 
getValue](https://user-images.githubusercontent.com/14866067/60784778-d1408e00-a182-11e9-8229-452a004fb6e0.png)
   ![MemoryQueryResult call the old 
getValue](https://user-images.githubusercontent.com/14866067/60784761-c685f900-a182-11e9-8ef7-31371658c823.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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to