Repository navigation
SQLRDD: revert descending-order scope change from #2112 (ADS/DBFCDX keep keys from bottom up) - #2116
Merged
RobertvanderHulst merged 1 commit intoOct 24, 2026
Conversation
… DBFCDX" This reverts commit 06a2a93. The premise was wrong: tested against the same DBF/CDX file, both ADS (AXDBFCDX) and X#'s DBFCDX return, for a descending tag with TOPSCOPE "A" and BOTTOMSCOPE "A20261023", only the keys from the bottom value upwards - exactly what SQLRDD did before. The reverted change made SQLRDD return the keys between the two values instead, which is not ADS compatible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reverts the second part of #2112 ("treat scopes on descending orders as key ranges"). The DTOS() part of #2112 is correct and stays.
Why
My premise in #2112 was wrong. I read the
TopScopeNo/BottomScopeNoswap inCdxTagas "scopes are a key range [top..bottom] on descending tags" without testing it. Measured on the same DBF/CDX file (tagHDR_NR+DTOS(DATUM), descending), both AXDBFCDX (ADS local) and X# DBFCDX return:0000000005, bottom0000000005202610210000000005, bottom000000000520261023So on a descending tag only the keys from the bottom value upwards are returned, not the keys between the two values. That is exactly what SQLRDD did before #2112. The change in #2112 made SQLRDD differ from both DBF RDDs.
The application bug that led me there (a return of 0 in a fund evaluation) was caused by a field comparison in the application itself, not by the scopes. I am sorry for the noise.
Change
Revert of the
SQLDbOrder.prgpart of #2112:GetScopeClause()again builds both bounds throughRangeExpression(), which applies the direction of the order.Test plan
hdr_nr+dtos(datum), descending): after the revert the descending-order scope again returns only the keys from the bottom value upwards, as AXDBFCDX/DBFCDX do🤖 Generated with Claude Code