@Override public long getRawHash(int groupId) { return BigintType.hash(valuesByGroupId.get(groupId)); }
@Override public long getRawHash(int groupId) { return BigintType.hash(valuesByGroupId.get(groupId)); }
private static long calculateDefaultOutputHash(List<Type> groupByChannels, int groupIdChannel, int groupId) { // Default output has NULLs on all columns except of groupIdChannel long result = INITIAL_HASH_VALUE; for (int channel = 0; channel < groupByChannels.size(); channel++) { if (channel != groupIdChannel) { result = CombineHashFunction.getHash(result, NULL_HASH_CODE); } else { result = CombineHashFunction.getHash(result, BigintType.hash(groupId)); } } return result; } }
private static long calculateDefaultOutputHash(List<Type> groupByChannels, int groupIdChannel, int groupId) { // Default output has NULLs on all columns except of groupIdChannel long result = INITIAL_HASH_VALUE; for (int channel = 0; channel < groupByChannels.size(); channel++) { if (channel != groupIdChannel) { result = CombineHashFunction.getHash(result, NULL_HASH_CODE); } else { result = CombineHashFunction.getHash(result, BigintType.hash(groupId)); } } return result; } }