BUG: For a rather exotic dataset the sorting key
of the converted data may not reflect the actual
sorting, since truncation of variables may affect
the ranking of observations.
Data values are NOT affected or lost as a result
of this issue, it only concerns the sorting key
declaration.
Order of observations is also not affected by
this issue.
There is no evidence or notification that any
user was ever affected by this bug and it is
extremely unlikely to occur. It was only confirmed
in an artificially generated dataset during a
code analysis/review.
Specific conditions when this can occur:
IF dataset's sortkey contains multiple variables
AND at least one of them S is a strF
AND storage type of S is longer than 244
AND S occurs in the sort order not last (there is X immediately after S)
AND X is of type numeric or string, but if string then of type strF, not of type strL
AND there exist such an observation n such that: S[n][1..244]==S[n-1][1..244], but at the same time X[n]<X[n-1]
THEN sorting key of converted data may become inconsistent
X can be any - numeric or string, but not a strL string.
If X is strL there is no problem (even if there are more
variables after X in the sort sequence).
Example (n=4):
S X
aaaaa...244times...aaab 1
aaaaa...244times...aaab 2
aaaaa...244times...aaab 3
aaaaa...244times...aaac 1
aaaaa...244times...aaac 2
aaaaa...244times...aaac 3
sorted by: S X
converted dataset is no longer sorted by S X
S X
aaaaa...244times...aaa 1
aaaaa...244times...aaa 2
aaaaa...244times...aaa 3
aaaaa...244times...aaa 1
aaaaa...244times...aaa 2
aaaaa...244times...aaa 3