Skip to content

Commit

Permalink
address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
hatyo committed Feb 10, 2025
1 parent 817c834 commit 53e019c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Our API stability annotations have been updated to reflect greater API instabili
* **Bug fix** Fix 1 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Bug fix** Fix 2 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Bug fix** Fix 3 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Bug fix** The relational component now specifies `Locale.ROOT` in all usages of `String.format` which may change number formatting if the default locale does not align [(Issue #3121)](https://github.com/FoundationDB/fdb-record-layer/issues/3121)
* **Bug fix** ungrouped GROUP BY queries result in infinite continuations when maxRows is 1 [(Issue #3093)](https://github.com/FoundationDB/fdb-record-layer/issues/3093)
* **Bug fix** Fix 5 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
* **Performance** Improvement 1 [(Issue #NNN)](https://github.com/FoundationDB/fdb-record-layer/issues/NNN)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,17 +668,17 @@ public static void validateLimit(@Nonnull Expression expression) {
Assert.thatUnchecked(underlying instanceof LiteralValue<?>);
final var value = ((LiteralValue<?>) underlying).getLiteralValue();
Assert.notNullUnchecked(value, ErrorCode.INVALID_ROW_COUNT_IN_LIMIT_CLAUSE,
() -> String.format(Locale.ROOT, "limit value out of range [1, %s]", Integer.MAX_VALUE));
() -> String.format(Locale.ROOT, "limit value out of range [1, %d]", Integer.MAX_VALUE));
if (value.getClass() == Integer.class) {
Assert.thatUnchecked(minInclusive <= ((Integer) value) && ((Integer) value) <= maxInclusive,
ErrorCode.INVALID_ROW_COUNT_IN_LIMIT_CLAUSE,
() -> String.format(Locale.ROOT, "limit value out of range [1, %s]", Integer.MAX_VALUE));
() -> String.format(Locale.ROOT, "limit value out of range [1, %d]", Integer.MAX_VALUE));
return;
}
if (value.getClass() == Long.class) {
Assert.thatUnchecked(minInclusive <= ((Long) value) && ((Long) value) <= maxInclusive,
ErrorCode.INVALID_ROW_COUNT_IN_LIMIT_CLAUSE,
() -> String.format(Locale.ROOT, "limit value out of range [1, %s]", Integer.MAX_VALUE));
() -> String.format(Locale.ROOT, "limit value out of range [1, %d]", Integer.MAX_VALUE));
return;
}
Assert.failUnchecked("unexpected limit type " + value.getClass());
Expand Down

0 comments on commit 53e019c

Please sign in to comment.