terrymanu commented on a change in pull request #4768: add sql state and vendor 
code for this
URL: 
https://github.com/apache/incubator-shardingsphere/pull/4768#discussion_r393056084
 
 

 ##########
 File path: 
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/resultset/EncryptResultSetMetaData.java
 ##########
 @@ -89,8 +90,7 @@ public String getColumnName(final int column) throws 
SQLException {
         if (sqlStatementContext instanceof SelectStatementContext) {
             List<Projection> actualProjections = ((SelectStatementContext) 
sqlStatementContext).getProjectionsContext().getExpandProjections();
             if (column > actualProjections.size()) {
-                // TODO fill correct SQL state
-                throw new SQLException(String.format("Out of index of 
projection %s", column));
+                throw new SQLException(String.format("Out of index of 
projection %s", column), SQLExceptionConstant.OUT_OF_INDEX_SQL_STAT, 0);
 
 Review comment:
   Maybe we need to check string information "Out of index of projection %s" too

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