agoodcoolman edited a comment on issue #14336:
URL:
https://github.com/apache/shardingsphere/issues/14336#issuecomment-1001334206
i don't know how to fix it.
> public PaginationContext(final PaginationValueSegment offsetSegment, final
PaginationValueSegment rowCountSegment, >final List<Object> parameters) {
> hasPagination = null != offsetSegment || null != rowCountSegment;
> this.offsetSegment = offsetSegment;
> this.rowCountSegment = rowCountSegment;
> actualOffset = null == offsetSegment ? 0L :
getValue(offsetSegment, parameters);
> actualRowCount = null == rowCountSegment ? null :
getValue(rowCountSegment, parameters);
> }
>
> private long getValue(final PaginationValueSegment
paginationValueSegment, final List<Object> parameters) {
> if (paginationValueSegment instanceof
ParameterMarkerPaginationValueSegment) {
> Object obj = null == parameters || parameters.isEmpty() ? 0L :
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]