v.25.12Bug Fix (user-visible misbehavior in an official stable release)

Fix incorrect sharding

Fixed incorrect sharding in JOIN optimization when the primary key is sorted in descending order. Resolves #88512. #88794 (Amos Bird).