-
Notifications
You must be signed in to change notification settings - Fork 292
Drop _tmp_metadata_row_index column from the output of Delta Scan on GPU #13991
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
Changes from 5 commits
0cf8bb5
31743d2
75bb8f5
baea0c2
1671116
2af9c5d
e67c990
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 |
|---|---|---|
|
|
@@ -160,3 +160,22 @@ def convert_and_setup_name_mapping(spark): | |
| with_cpu_session(setup_parquet_table, {"spark.sql.parquet.fieldId.write.enabled": str(enable_deletion_vectors).lower()}) | ||
| with_cpu_session(convert_and_setup_name_mapping, conf={"spark.databricks.delta.properties.defaults.enableDeletionVectors": "false"}) | ||
| assert_gpu_and_cpu_are_equal_collect(lambda spark: spark.read.format("delta").load(data_path)) | ||
|
|
||
| @allow_non_gpu(*delta_meta_allow) | ||
| @delta_lake | ||
| @ignore_order(local=True) | ||
| @pytest.mark.skipif(not is_spark_340_or_later(), reason="Deletion Vectors only supported on Spark 3.4.0+") | ||
| def test_delta_filter_out_metadata_col(spark_tmp_path): | ||
| data_path = spark_tmp_path + "/DELTA_DATA" | ||
|
|
||
| def create_delta(spark): | ||
| two_col_df(spark, int_gen, int_gen).coalesce(1).write.format("delta") \ | ||
| .option("delta.enableDeletionVectors", "true") \ | ||
| .partitionBy("a").save(data_path) | ||
|
|
||
| spark.sql(f"DELETE FROM delta.`{data_path}` WHERE b = 0") | ||
|
Collaborator
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. Should we assert that we deleted at least one row by looking at the result df returned by this statement?
Collaborator
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. good idea. I think we should |
||
|
|
||
| def read_table(spark): | ||
| return spark.sql(f"SELECT * FROM delta.`{data_path}` ") | ||
|
Collaborator
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. Alternatively to the above suggestions, can we assert the explain output includes DV-enabled scan with |
||
| with_cpu_session(create_delta) | ||
| assert_gpu_and_cpu_are_equal_collect(read_table) | ||
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.
Is
int_genguaranteed to have a 0 that you are later deleting?Is
coalesce(1)the same as passingnum_slices=1totwo_col_df?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.
0 is guaranteed to be present as it's a
special_casein the IntegerGen