Skip to content

Commit fc58bec

Browse files
committed
Cleanup unused methods and code
Signed-off-by: Rob Syme <[email protected]>
1 parent d105842 commit fc58bec

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

modules/nextflow/src/main/groovy/nextflow/extension/JoinOp.groovy

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ class JoinOp {
5858

5959
private Set uniqueKeys = new LinkedHashSet()
6060

61-
private Map<Object,Object> originalKeyMap = new HashMap()
62-
6361
JoinOp( DataflowReadChannel source, DataflowReadChannel target, Map params = null ) {
6462
CheckHelper.checkParams('join', params, JOIN_PARAMS)
6563
this.source = source
@@ -175,24 +173,6 @@ class JoinOp {
175173
// get the index key for this object
176174
final item0 = DataflowHelper.makeKey(pivot, data)
177175

178-
// Store the mapping from normalized key to original key
179-
// Prefer GroupKey over plain keys
180-
def existingOriginal = originalKeyMap.get(item0.keys)
181-
if (existingOriginal == null) {
182-
originalKeyMap[item0.keys] = item0.originalKeys
183-
} else {
184-
// Check if any of the new original keys is a GroupKey
185-
// If so, replace the existing mapping
186-
for (int i = 0; i < item0.originalKeys.size(); i++) {
187-
def newKey = item0.originalKeys[i]
188-
def oldKey = existingOriginal instanceof List ? existingOriginal[i] : existingOriginal
189-
if (newKey instanceof GroupKey && !(oldKey instanceof GroupKey)) {
190-
originalKeyMap[item0.keys] = item0.originalKeys
191-
break
192-
}
193-
}
194-
}
195-
196176
// check for unique keys
197177
checkForDuplicate(item0.keys, item0.values, index, false)
198178

@@ -210,7 +190,6 @@ class JoinOp {
210190
def entries = channels[index]
211191

212192
// add the received item to the list
213-
// Store the full KeyPair to preserve original keys
214193
entries << item0
215194
setSingleton(index, item0.values.size()==0)
216195

@@ -265,16 +244,6 @@ class JoinOp {
265244
return result
266245
}
267246

268-
// Helper method to retrieve original data from buffer
269-
private def getOriginalDataFromBuffer(Map<Object,Map<Integer,List>> buffer, Object key, int channelIndex) {
270-
def channels = buffer.get(key)
271-
if (channels == null) return null
272-
def items = channels.get(channelIndex)
273-
if (items == null || items.isEmpty()) return null
274-
// Need to reconstruct the original data from the values and the key
275-
// This is a simplified version - in reality we'd need to track the full original items
276-
return null // For now, we'll use a different approach
277-
}
278247

279248
private final void checkRemainder(Map<Object,Map<Integer,List>> buffers, int count, DataflowWriteChannel target ) {
280249
log.trace "Operator `join` remainder buffer: ${-> buffers}"
@@ -310,7 +279,7 @@ class JoinOp {
310279
}
311280

312281
// Use the best available original key, or fall back to the map key
313-
def originalKey = bestOriginalKey ?: originalKeyMap.get(key) ?: key
282+
def originalKey = bestOriginalKey ?: key
314283
addToList(result, originalKey)
315284

316285
for( int i=0; i<count; i++ ) {

0 commit comments

Comments
 (0)