Skip to content

Commit 05d2911

Browse files
committed
except hash columns
1 parent 0434850 commit 05d2911

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

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

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,15 @@ public static Decoder createDecoder(String spec, String[] colnames, ValueType[]
6767
List<Decoder> ldecoders = new ArrayList<>();
6868

6969
//create decoders 'bin', 'recode', 'dummy' and 'pass-through'
70-
List<Integer> rcIDs = Arrays.asList(ArrayUtils
71-
.toObject(TfMetaUtils.parseJsonIDList(jSpec, colnames, TfMethod.RECODE.toString(), minCol, maxCol)));
72-
List<Integer> haIDs = Arrays.asList(ArrayUtils
73-
.toObject(TfMetaUtils.parseJsonIDList(jSpec, colnames, TfMethod.HASH.toString(), minCol, maxCol)));
74-
List<Integer> dcIDs = Arrays.asList(ArrayUtils
75-
.toObject(TfMetaUtils.parseJsonIDList(jSpec, colnames, TfMethod.DUMMYCODE.toString(), minCol, maxCol)));
76-
77-
7870
List<Integer> binIDs = TfMetaUtils.parseBinningColIDs(jSpec, colnames, minCol, maxCol);
79-
List<Integer> weIDs = Arrays.asList(ArrayUtils
80-
.toObject(TfMetaUtils.parseJsonIDList(jSpec, colnames, TfMethod.WORD_EMBEDDING.toString(), minCol, maxCol)));
81-
List<Integer> bowIDs = Arrays.asList(ArrayUtils
82-
.toObject(TfMetaUtils.parseJsonIDList(jSpec, colnames, TfMethod.BAG_OF_WORDS.toString(), minCol, maxCol)));
83-
84-
dcIDs.removeAll(haIDs);
85-
rcIDs.removeAll(haIDs);
86-
71+
List<Integer> rcIDs = Arrays.asList(ArrayUtils.toObject(
72+
TfMetaUtils.parseJsonIDList(jSpec, colnames, TfMethod.RECODE.toString(), minCol, maxCol)));
73+
List<Integer> hcIDs = Arrays.asList(ArrayUtils.toObject(
74+
TfMetaUtils.parseJsonIDList(jSpec, colnames, TfMethod.HASH.toString(), minCol, maxCol)));
75+
List<Integer> dcIDs = Arrays.asList(ArrayUtils.toObject(
76+
TfMetaUtils.parseJsonIDList(jSpec, colnames, TfMethod.DUMMYCODE.toString(), minCol, maxCol)));
77+
rcIDs = unionDistinct(rcIDs, dcIDs);
78+
rcIDs = except(rcIDs, hcIDs);
8779
int len = dcIDs.isEmpty() ? Math.min(meta.getNumColumns(), clen) : meta.getNumColumns();
8880
List<Integer> ptIDs = except(except(UtilFunctions.getSeqList(1, len, 1), rcIDs), binIDs);
8981

0 commit comments

Comments
 (0)