@SuppressWarnings("rawtypes") private int compareKeysMany(WritableComparator[] comparators, final List<Object> k1, final List<Object> k2) { // invariant: k1.size == k2.size int ret = 0; final int size = k1.size(); for (int i = 0; i < size; i++) { WritableComparable key_1 = (WritableComparable) k1.get(i); WritableComparable key_2 = (WritableComparable) k2.get(i); ret = compareKey(comparators, i, key_1, key_2, nullsafes != null ? nullsafes[i] : false); if (ret != 0) { return ret; } } return ret; }
@SuppressWarnings("rawtypes") private int compareKeys(byte alias, List<Object> k1, List<Object> k2) { final WritableComparator[] comparators = keyComparators[alias]; // join keys have difference sizes? if (k1.size() != k2.size()) { return k1.size() - k2.size(); } if (comparators.length == 0) { // cross-product - no keys really return 0; } if (comparators.length > 1) { // rare case return compareKeysMany(comparators, k1, k2); } else { return compareKey(comparators, 0, (WritableComparable) k1.get(0), (WritableComparable) k2.get(0), nullsafes != null ? nullsafes[0]: false); } }
@SuppressWarnings("rawtypes") private int compareKeys(byte alias, List<Object> k1, List<Object> k2) { final WritableComparator[] comparators = keyComparators[alias]; // join keys have difference sizes? if (k1.size() != k2.size()) { return k1.size() - k2.size(); } if (comparators.length == 0) { // cross-product - no keys really return 0; } if (comparators.length > 1) { // rare case return compareKeysMany(comparators, k1, k2); } else { return compareKey(comparators, 0, (WritableComparable) k1.get(0), (WritableComparable) k2.get(0), nullsafes != null ? nullsafes[0]: false); } }
@SuppressWarnings("rawtypes") private int compareKeysMany(WritableComparator[] comparators, final List<Object> k1, final List<Object> k2) { // invariant: k1.size == k2.size int ret = 0; final int size = k1.size(); for (int i = 0; i < size; i++) { WritableComparable key_1 = (WritableComparable) k1.get(i); WritableComparable key_2 = (WritableComparable) k2.get(i); ret = compareKey(comparators, i, key_1, key_2, nullsafes != null ? nullsafes[i] : false); if (ret != 0) { return ret; } } return ret; }
@SuppressWarnings("rawtypes") private int compareKeys(byte alias, List<Object> k1, List<Object> k2) { final WritableComparator[] comparators = keyComparators[alias]; // join keys have difference sizes? if (k1.size() != k2.size()) { return k1.size() - k2.size(); } if (comparators.length == 0) { // cross-product - no keys really return 0; } if (comparators.length > 1) { // rare case return compareKeysMany(comparators, k1, k2); } else { return compareKey(comparators, 0, (WritableComparable) k1.get(0), (WritableComparable) k2.get(0), nullsafes != null ? nullsafes[0]: false); } }
@SuppressWarnings("rawtypes") private int compareKeysMany(WritableComparator[] comparators, final List<Object> k1, final List<Object> k2) { // invariant: k1.size == k2.size int ret = 0; final int size = k1.size(); for (int i = 0; i < size; i++) { WritableComparable key_1 = (WritableComparable) k1.get(i); WritableComparable key_2 = (WritableComparable) k2.get(i); ret = compareKey(comparators, i, key_1, key_2, nullsafes != null ? nullsafes[i] : false); if (ret != 0) { return ret; } } return ret; }