diff --git a/java/src/main/java/ai/rapids/cudf/ColumnVector.java b/java/src/main/java/ai/rapids/cudf/ColumnVector.java index 3fed6316215..c83fe6adca1 100644 --- a/java/src/main/java/ai/rapids/cudf/ColumnVector.java +++ b/java/src/main/java/ai/rapids/cudf/ColumnVector.java @@ -680,7 +680,7 @@ public static ColumnVector md5Hash(ColumnView... columns) { "Unsupported nested type column"; columnViews[i] = columns[i].getNativeView(); } - return new ColumnVector(hash(columnViews, HashType.HASH_MD5.getNativeId(), new int[0], 0)); + return new ColumnVector(hash(columnViews, HashType.HASH_MD5.getNativeId(), 0)); } /** @@ -704,7 +704,7 @@ public static ColumnVector serial32BitMurmurHash3(int seed, ColumnView columns[] assert !columns[i].getType().equals(DType.LIST) : "List columns are not supported"; columnViews[i] = columns[i].getNativeView(); } - return new ColumnVector(hash(columnViews, HashType.HASH_SERIAL_MURMUR3.getNativeId(), new int[0], seed)); + return new ColumnVector(hash(columnViews, HashType.HASH_SERIAL_MURMUR3.getNativeId(), seed)); } /** @@ -739,7 +739,7 @@ public static ColumnVector spark32BitMurmurHash3(int seed, ColumnView columns[]) assert !columns[i].getType().equals(DType.LIST) : "List columns are not supported"; columnViews[i] = columns[i].getNativeView(); } - return new ColumnVector(hash(columnViews, HashType.HASH_SPARK_MURMUR3.getNativeId(), new int[0], seed)); + return new ColumnVector(hash(columnViews, HashType.HASH_SPARK_MURMUR3.getNativeId(), seed)); } /** @@ -859,14 +859,10 @@ private static native long stringConcatenationSepCol(long[] columnViews, * * @param viewHandles array of native handles to the cudf::column_view columns being operated on. * @param hashId integer native ID of the hashing function identifier HashType. - * @param initialValues array of integer values, one per column, only used by non-serial murmur3 - * hash. Each element's hash value is merged with its column's initial value - * before the row is merged into a single value. * @param seed integer seed for the hash. Only used by serial murmur3 hash. * @return native handle of the resulting cudf column containing the hex-string hashing results. */ - private static native long hash(long[] viewHandles, int hashId, int[] initialValues, - int seed) throws CudfException; + private static native long hash(long[] viewHandles, int hashId, int seed) throws CudfException; ///////////////////////////////////////////////////////////////////////////// // INTERNAL/NATIVE ACCESS diff --git a/java/src/main/native/src/ColumnVectorJni.cpp b/java/src/main/native/src/ColumnVectorJni.cpp index 7fe466f828f..cfad89cb399 100644 --- a/java/src/main/native/src/ColumnVectorJni.cpp +++ b/java/src/main/native/src/ColumnVectorJni.cpp @@ -327,10 +327,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_ColumnVector_concatenate(JNIEnv *env JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_ColumnVector_hash(JNIEnv *env, jobject j_object, jlongArray column_handles, - jint hash_function_id, - jintArray initial_values, jint seed) { + jint hash_function_id, jint seed) { JNI_NULL_CHECK(env, column_handles, "array of column handles is null", 0); - JNI_NULL_CHECK(env, initial_values, "array of initial values is null", 0); try { cudf::jni::native_jpointerArray n_cudf_columns(env, column_handles); @@ -340,13 +338,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_ColumnVector_hash(JNIEnv *env, jobje [](auto const &p_column) { return *p_column; }); cudf::table_view *input_table = new cudf::table_view(column_views); - cudf::jni::native_jintArray native_iv(env, initial_values); - std::vector vector_iv; - std::transform(native_iv.data(), native_iv.data() + native_iv.size(), - std::back_inserter(vector_iv), [](auto const &iv) { return iv; }); - std::unique_ptr result = - cudf::hash(*input_table, static_cast(hash_function_id), vector_iv, seed); + cudf::hash(*input_table, static_cast(hash_function_id), seed); return reinterpret_cast(result.release()); } CATCH_STD(env, 0);