-
Notifications
You must be signed in to change notification settings - Fork 232
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
Improve some CSV integration tests [databricks] #9146
Improve some CSV integration tests [databricks] #9146
Conversation
Signed-off-by: Andy Grove <andygrove@nvidia.com>
Signed-off-by: Andy Grove <andygrove@nvidia.com>
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.
LGTM, pending CI
# TODO this does not confirm that this scan actually runs on GPU, but I am not | ||
# sure if we can capture the plan with a COUNT, since it normally requires a COLLECT |
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.
let us file an issue and maybe reference it in the comment
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.
Thanks @gerashegalov . I have filed #9199 and updated the comment.
build |
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.
Could we run this on databricks too? Just because that is one place where we often see them plan thing differently.
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.
LGTM
lambda spark : spark.read.schema(gen.data_type)\ | ||
.csv(data_path)\ | ||
.filter(f.col('a') > 0)\ | ||
.selectExpr('a', | ||
'input_file_name()', | ||
'input_file_block_start()', | ||
'input_file_block_length()'), | ||
cpu_fallback_class_name = 'FileSourceScanExec' if v1_enabled_list == 'csv' else 'BatchScanExec', |
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.
not a must-fix, stylistically and because in a future the parameter v1_enabled_list
might become a comma-separated value or a Python list we might want to check for 'csv' in v1_enabled_list
rather than equality.
build |
Some of the CSV integration tests need to allow some operators to fallback because, in some cases, the CPU scans the file before the GPU does (such as when inferring the schema). However, these tests were then invoking
assert_gpu_and_cpu_are_equal_collect
without verifying that anything ran on the GPU, meaning that the tests were not really testing what they needed to, and regressions could go undetected.This PR aims to address that by calling
assert_cpu_and_gpu_are_equal_collect_with_capture
instead, and confirming that the expected operator ran on the GPU.