Skip to content

Commit d32d5dd

Browse files
committed
check
1 parent 247a18c commit d32d5dd

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ public void initMetaData(FrameBlock meta) {
142142
}
143143
else { //_colList[ix1] > _dcCols[ix2]
144144
ColumnMetadata d =meta.getColumnMetadata()[_dcCols[ix2]-1];
145-
String v = meta.getString( _dcCols[ix2]-1, 0);
146-
if(v.charAt(0) == '¿'){
145+
String v = meta.getString(0, _dcCols[ix2]-1);
146+
if(v.length() > 1 && v.charAt(0) == '¿'){
147147
off += UtilFunctions.parseToLong(v.substring(1));
148148
}
149149
else {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public static Decoder createDecoder(String spec, String[] colnames, ValueType[]
109109
ArrayUtils.toPrimitive(dcIDs.toArray(new Integer[0]))));
110110
}
111111
if( !rcIDs.isEmpty() ) {
112+
// todo figure out if we need to handle rc columns with regards to dictionary offsets.
112113
ldecoders.add(new DecoderRecode(schema, !dcIDs.isEmpty(),
113114
ArrayUtils.toPrimitive(rcIDs.toArray(new Integer[0]))));
114115
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void initMetaData(FrameBlock meta) {
113113
}
114114
else { //_colList[ix1] > _dcCols[ix2]
115115
ColumnMetadata d =meta.getColumnMetadata()[_dcCols[ix2]-1];
116-
String v = meta.getString( _dcCols[ix2]-1, 0);
116+
String v = meta.getString( 0,_dcCols[ix2]-1);
117117
if(v.charAt(0) == '¿'){
118118
off += UtilFunctions.parseToLong(v.substring(1));
119119
}

0 commit comments

Comments
 (0)