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 2020/08/06 08:35:15 UTC

[GitHub] [shardingsphere] xiangtao123 commented on issue #6656: SQL-Parse-LimitSegment: PaginationContext.getValue(PaginationContext.java:57): Cause: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

xiangtao123 commented on issue #6656:
URL: https://github.com/apache/shardingsphere/issues/6656#issuecomment-669793109


   long org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext.getValue(PaginationValueSegment paginationValueSegment, List<Object> parameters)
   
   `    
   private long getValue(final PaginationValueSegment paginationValueSegment, final List<Object> parameters) {
           if (paginationValueSegment instanceof ParameterMarkerPaginationValueSegment) {
               Object obj = parameters.get(((ParameterMarkerPaginationValueSegment) paginationValueSegment).**getParameterIndex()**);
               return obj instanceof Long ? (long) obj : (int) obj;
           } else {
               return ((NumberLiteralPaginationValueSegment) paginationValueSegment).getValue();
           }
       }
   `
   


----------------------------------------------------------------
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:
users@infra.apache.org