Skip to content

Commit 7b2ecdd

Browse files
committed
fix
1 parent d32d5dd commit 7b2ecdd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/org/apache/sysds/runtime/transform/decode/DecoderBin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public void initMetaData(FrameBlock meta) {
144144
ColumnMetadata d =meta.getColumnMetadata()[_dcCols[ix2]-1];
145145
String v = meta.getString(0, _dcCols[ix2]-1);
146146
if(v.length() > 1 && v.charAt(0) == '¿'){
147-
off += UtilFunctions.parseToLong(v.substring(1));
147+
off += UtilFunctions.parseToLong(v.substring(1)) -1;
148148
}
149149
else {
150150
off += d.isDefault() ? -1 : d.getNumDistinct() - 1;

src/main/java/org/apache/sysds/runtime/transform/decode/DecoderPassThrough.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ public void initMetaData(FrameBlock meta) {
114114
else { //_colList[ix1] > _dcCols[ix2]
115115
ColumnMetadata d =meta.getColumnMetadata()[_dcCols[ix2]-1];
116116
String v = meta.getString( 0,_dcCols[ix2]-1);
117-
if(v.charAt(0) == '¿'){
118-
off += UtilFunctions.parseToLong(v.substring(1));
117+
if(v.length() > 1 && v.charAt(0) == '¿'){
118+
off += UtilFunctions.parseToLong(v.substring(1)) -1;
119119
}
120120
else {
121121
off += d.isDefault() ? -1 : d.getNumDistinct() - 1;

0 commit comments

Comments
 (0)