diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/segment/select/pagination/PaginationContext.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/segment/select/pagination/PaginationContext.java index 69876d3c8cf10..6acda0c7fb195 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/segment/select/pagination/PaginationContext.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/context/segment/select/pagination/PaginationContext.java @@ -58,7 +58,7 @@ private Long getValue(final PaginationValueSegment paginationValueSegment, final if (null == obj) { return null; } - return obj instanceof Long ? (long) obj : (int) obj; + return obj instanceof byte[] ? (long) (((byte[]) obj)[0] - '0') : obj instanceof Long ? (long) obj : (int) obj; } if (paginationValueSegment instanceof ExpressionRowNumberValueSegment) { return ((ExpressionRowNumberValueSegment) paginationValueSegment).getValue(params); diff --git a/test/e2e/sql/src/test/resources/cases/dql/e2e-dql-select.xml b/test/e2e/sql/src/test/resources/cases/dql/e2e-dql-select.xml index e25146bbf08cb..b1f793b2f9af1 100644 --- a/test/e2e/sql/src/test/resources/cases/dql/e2e-dql-select.xml +++ b/test/e2e/sql/src/test/resources/cases/dql/e2e-dql-select.xml @@ -163,7 +163,7 @@ - + @@ -182,4 +182,8 @@ + + + +