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
I get out-of-bounds error when reading SAS dataset with:
BINARY compression
and either:
composite index or
primary key defined
dataset has at least 3 pages = in SAS log e. g. : Compressed is 3 pages; un-compressed would require 4 pages
This is on current SASLib v1.3.1, SAS is 9.4 on Windows.
I didn't find this issue with CHAR compression.
I wonder if have access to SAS and can replicate this.
data work.test_comp_pk(compress=binary);
length rowno 8 text text2 $50;
do rowno = 1 to 2000;
text = catt("text", put(rowno, z8.));
text2 = "anything";
output;
end;
run;
/* either this */
proc sql;
create index ix on work.test_comp_pk (rowno, text)
;
quit;
/* or this */
proc sql;
alter table work.test_comp_pk
add constraint pk primary key (rowno)
;
quit;
When either composite index or primary key is created on this sample dataset, I get error like this:
julia> s = readsas(raw"E:\temp\test_comp_pk.sas7bdat")
ERROR: BoundsError: attempt to access 33-element Vector{UInt8} at index [34]
Stacktrace:
[1] getindex
@ .\array.jl:861 [inlined]
[2] rle_decompress(output_len::Int64, input::Vector{UInt8})
@ SASLib D:\lang\julia_packages\packages\SASLib\AkuJe\src\SASLib.jl:1424
[3] process_byte_array_with_data(handler::SASLib.Handler, offset::Int64, length::Int64, compression::UInt8)
@ SASLib D:\lang\julia_packages\packages\SASLib\AkuJe\src\SASLib.jl:1198
[4] readline(handler::SASLib.Handler)
@ SASLib D:\lang\julia_packages\packages\SASLib\AkuJe\src\SASLib.jl:1119
The presence of index or primary key is contained in SAS dataset metadata and it seems to confuse the reading logic.
EDIT: originally I reported messed-up results, but this was because I messed-up with the code when trying to find out what's going on there :-( .
Sorry for confusion and thank you for all of the effort.
The text was updated successfully, but these errors were encountered:
I get out-of-bounds error when reading SAS dataset with:
Compressed is 3 pages; un-compressed would require 4 pages
This is on current SASLib v1.3.1, SAS is 9.4 on Windows.
I didn't find this issue with CHAR compression.
I wonder if have access to SAS and can replicate this.
When either composite index or primary key is created on this sample dataset, I get error like this:
The presence of index or primary key is contained in SAS dataset metadata and it seems to confuse the reading logic.
EDIT: originally I reported messed-up results, but this was because I messed-up with the code when trying to find out what's going on there :-( .
Sorry for confusion and thank you for all of the effort.
The text was updated successfully, but these errors were encountered: