You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cross-shard): compute LIMIT/OFFSET with integer arithmetic and casts - #2030
Cross-shard GROUP BY with aggregates or HAVING rejected LIMIT 1 + 1 and LIMIT $1::int with 0A000.
Fix
LimitClause computes integer arithmetic (+ - * / %, unary -/+) and
casts to int2/int4/int8 over literals and parameters. A cast
fails when the value doesn't fit the type. NULL anywhere means no limit,
as in Postgres.
Still rejected with 0A000: functions, subqueries, decimal literals,
non-integer casts, and simple-protocol PREPARE/EXECUTE with an
expression.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cross-shard
GROUP BYwith aggregates orHAVINGrejectedLIMIT 1 + 1andLIMIT $1::intwith0A000.Fix
LimitClausecomputes integer arithmetic (+ - * / %, unary-/+) andcasts to
int2/int4/int8over literals and parameters. A castfails when the value doesn't fit the type.
NULLanywhere means no limit,as in Postgres.
Still rejected with
0A000: functions, subqueries, decimal literals,non-integer casts, and simple-protocol
PREPARE/EXECUTEwith anexpression.