<commit_before>package com.nhl.link.move.runtime.task.delete;

import com.nhl.dflib.DataFrame;
import org.apache.cayenne.ObjectContext;

import java.util.ArrayList;
import java.util.List;

/**
 * @since 1.3
 */
public class DeleteTargetStage<T> {

	public void delete(ObjectContext context, DataFrame df) {
		List<T> toDelete = new ArrayList<>(df.height());
		df.forEach(r -> toDelete.add((T) r.get(DeleteSegment.TARGET_COLUMN)));
		context.deleteObjects(toDelete);
	}
}
<commit_msg>Refactoring to a DFLib-friendly approach<commit_after>package com.nhl.link.move.runtime.task.delete;

import com.nhl.dflib.DataFrame;
import com.nhl.dflib.Series;
import org.apache.cayenne.ObjectContext;

/**
 * @since 1.3
 */
public class DeleteTargetStage<T> {

	public void delete(ObjectContext context, DataFrame df) {
		Series<T> toDelete = df.getColumn(DeleteSegment.TARGET_COLUMN);
		context.deleteObjects(toDelete.toList());
	}
}

{'fraction_non_alphanumeric': 0.13680781758957655, 'fraction_numerical': 0.004343105320304018, 'mean_word_length': 5.22972972972973, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5715006', 'n_tokens_mistral': 328, 'n_tokens_neox': 321, 'n_words': 56}