-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[FEA] Drop Obsolete cudf::filter API
#23934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
61ee589
388e7e2
9297780
a237d05
7372c4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1023,22 +1023,22 @@ table_with_metadata reader_impl::finalize_output(read_mode mode, | |
| out_metadata.num_rows_per_source.clear(); | ||
|
|
||
| bool use_jit = cudf::get_context().use_jit() || _options.use_jit_filter; | ||
| std::unique_ptr<column> predicate; | ||
|
|
||
| if (!use_jit) { | ||
| auto predicate = | ||
| predicate = | ||
| cudf::detail::compute_column(*read_table, final_filter_expr.value().get(), _stream, _mr); | ||
| CUDF_EXPECTS(predicate->view().type().id() == type_id::BOOL8, | ||
| "Predicate filter should return a boolean"); | ||
| // Exclude columns present in filter only in output | ||
| auto output_table = cudf::detail::apply_mask( | ||
| only_output, *predicate, cudf::detail::mask_type::RETENTION, _stream, _mr); | ||
| return {encode_output_dict_columns(std::move(output_table)), std::move(out_metadata)}; | ||
| } else { | ||
| auto output_table = cudf::filter( | ||
| read_table->view(), final_filter_expr.value().get(), only_output, _stream, _mr); | ||
|
|
||
| return {encode_output_dict_columns(std::move(output_table)), std::move(out_metadata)}; | ||
| predicate = | ||
| cudf::compute_column_jit(*read_table, final_filter_expr.value().get(), _stream, _mr); | ||
| } | ||
|
|
||
| CUDF_EXPECTS(predicate->view().type().id() == type_id::BOOL8, | ||
| "Predicate filter should return a boolean"); | ||
| // Exclude columns present in filter only in output | ||
| auto output_table = cudf::detail::apply_mask( | ||
| only_output, *predicate, cudf::detail::mask_type::RETENTION, _stream, _mr); | ||
|
Comment on lines
1028
to
+1040
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Add a Parquet reader regression test for the unified JIT path. Test both As per coding guidelines, “Add unit tests and unit benchmarks.” 🤖 Prompt for AI AgentsSource: Coding guidelines
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the transform tests already cover this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- candidate test files ---'
fd -t f . cpp/tests | rg '(transform|parquet).*test|test.*(transform|parquet)' || true
printf '%s\n' '--- Parquet reader filter and JIT references ---'
rg -n -i -C 3 \
'use_jit_filter|set_.*filter|filter_only|filter.*only|compute_column_jit|apply_mask' \
cpp/tests cpp/benchmarks \
-g '*.{cpp,cu,hpp,cuh}' || true
printf '%s\n' '--- transform test references to nullability and JIT ---'
rg -n -i -C 3 \
'transform\s*\(|compute_column_jit|jit|null' \
cpp/tests \
-g '*.{cpp,cu,hpp,cuh}' || trueLength of output: 201068
You are interacting with an AI system. |
||
| return {encode_output_dict_columns(std::move(output_table)), std::move(out_metadata)}; | ||
| } | ||
| return {encode_output_dict_columns(std::make_unique<table>(std::move(out_columns))), | ||
| std::move(out_metadata)}; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is deprecated, but
filter_extendedis not. Before deleting public APIs, we need a deprecation period.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I can hold off on the full deletion changes
Although I doubt this API has any adoption, as no results show up in GitHub search