Skip to content

Commit

Permalink
fix JNI code style
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowe committed Aug 16, 2021
1 parent 9336f25 commit 0cfc413
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions java/src/main/native/src/TableJni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Table_conditionalLeftJoinRowCount(
auto right_table = reinterpret_cast<cudf::table_view const *>(j_right_table);
auto condition = reinterpret_cast<cudf::jni::ast::compiled_expr const *>(j_condition);
auto nulleq = compare_nulls_equal ? cudf::null_equality::EQUAL : cudf::null_equality::UNEQUAL;
auto row_count = cudf::conditional_left_join_size(*left_table, *right_table, condition->get_top_expression(), nulleq);
auto row_count = cudf::conditional_left_join_size(*left_table, *right_table,
condition->get_top_expression(), nulleq);
return static_cast<jlong>(row_count);
}
CATCH_STD(env, 0);
Expand All @@ -1960,7 +1961,7 @@ JNIEXPORT jlongArray JNICALL Java_ai_rapids_cudf_Table_conditionalLeftJoinGather
return cudf::jni::cond_join_gather_maps(
env, j_left_table, j_right_table, j_condition, compare_nulls_equal,
[row_count](cudf::table_view const &left, cudf::table_view const &right,
cudf::ast::expression const &cond_expr, cudf::null_equality nulleq) {
cudf::ast::expression const &cond_expr, cudf::null_equality nulleq) {
return cudf::conditional_left_join(left, right, cond_expr, nulleq, row_count);
});
}
Expand All @@ -1986,7 +1987,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Table_conditionalInnerJoinRowCount(
auto right_table = reinterpret_cast<cudf::table_view const *>(j_right_table);
auto condition = reinterpret_cast<cudf::jni::ast::compiled_expr const *>(j_condition);
auto nulleq = compare_nulls_equal ? cudf::null_equality::EQUAL : cudf::null_equality::UNEQUAL;
auto row_count = cudf::conditional_inner_join_size(*left_table, *right_table, condition->get_top_expression(), nulleq);
auto row_count = cudf::conditional_inner_join_size(*left_table, *right_table,
condition->get_top_expression(), nulleq);
return static_cast<jlong>(row_count);
}
CATCH_STD(env, 0);
Expand All @@ -2010,7 +2012,7 @@ JNIEXPORT jlongArray JNICALL Java_ai_rapids_cudf_Table_conditionalInnerJoinGathe
return cudf::jni::cond_join_gather_maps(
env, j_left_table, j_right_table, j_condition, compare_nulls_equal,
[row_count](cudf::table_view const &left, cudf::table_view const &right,
cudf::ast::expression const &cond_expr, cudf::null_equality nulleq) {
cudf::ast::expression const &cond_expr, cudf::null_equality nulleq) {
return cudf::conditional_inner_join(left, right, cond_expr, nulleq, row_count);
});
}
Expand Down Expand Up @@ -2056,7 +2058,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Table_conditionalLeftSemiJoinRowCoun
auto right_table = reinterpret_cast<cudf::table_view const *>(j_right_table);
auto condition = reinterpret_cast<cudf::jni::ast::compiled_expr const *>(j_condition);
auto nulleq = compare_nulls_equal ? cudf::null_equality::EQUAL : cudf::null_equality::UNEQUAL;
auto row_count = cudf::conditional_left_semi_join_size(*left_table, *right_table, condition->get_top_expression(), nulleq);
auto row_count = cudf::conditional_left_semi_join_size(*left_table, *right_table,
condition->get_top_expression(), nulleq);
return static_cast<jlong>(row_count);
}
CATCH_STD(env, 0);
Expand All @@ -2080,7 +2083,7 @@ JNIEXPORT jlongArray JNICALL Java_ai_rapids_cudf_Table_conditionalLeftSemiJoinGa
return cudf::jni::cond_join_gather_single_map(
env, j_left_table, j_right_table, j_condition, compare_nulls_equal,
[row_count](cudf::table_view const &left, cudf::table_view const &right,
cudf::ast::expression const &cond_expr, cudf::null_equality nulleq) {
cudf::ast::expression const &cond_expr, cudf::null_equality nulleq) {
return cudf::conditional_left_semi_join(left, right, cond_expr, nulleq, row_count);
});
}
Expand All @@ -2106,7 +2109,8 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_Table_conditionalLeftAntiJoinRowCoun
auto right_table = reinterpret_cast<cudf::table_view const *>(j_right_table);
auto condition = reinterpret_cast<cudf::jni::ast::compiled_expr const *>(j_condition);
auto nulleq = compare_nulls_equal ? cudf::null_equality::EQUAL : cudf::null_equality::UNEQUAL;
auto row_count = cudf::conditional_left_anti_join_size(*left_table, *right_table, condition->get_top_expression(), nulleq);
auto row_count = cudf::conditional_left_anti_join_size(*left_table, *right_table,
condition->get_top_expression(), nulleq);
return static_cast<jlong>(row_count);
}
CATCH_STD(env, 0);
Expand All @@ -2130,7 +2134,7 @@ JNIEXPORT jlongArray JNICALL Java_ai_rapids_cudf_Table_conditionalLeftAntiJoinGa
return cudf::jni::cond_join_gather_single_map(
env, j_left_table, j_right_table, j_condition, compare_nulls_equal,
[row_count](cudf::table_view const &left, cudf::table_view const &right,
cudf::ast::expression const &cond_expr, cudf::null_equality nulleq) {
cudf::ast::expression const &cond_expr, cudf::null_equality nulleq) {
return cudf::conditional_left_anti_join(left, right, cond_expr, nulleq, row_count);
});
}
Expand Down

0 comments on commit 0cfc413

Please sign in to comment.