Skip to content
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

Fix Delta Lake part_write_round_trip_unmanaged tests with floating point [databricks] #9748

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions integration_tests/src/main/python/delta_lake_write_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ def test_delta_part_write_round_trip_unmanaged(spark_tmp_path, gens):
lambda spark, path: spark.read.format("delta").load(path),
data_path,
conf=copy_and_update(writer_confs, delta_writes_enabled_conf))
with_cpu_session(lambda spark: assert_gpu_and_cpu_delta_logs_equivalent(spark, data_path))
# Databricks will sometimes generate tons of tiny files on the CPU when using floating point
# partition keys. The GPU does not, and this triggers a delta log mismatch. Data contents
# of the table are correct, and this seems like Databricks bug on the CPU.
if not (is_databricks_runtime() and gens.data_type in (FloatType(), DoubleType())):
with_cpu_session(lambda spark: assert_gpu_and_cpu_delta_logs_equivalent(spark, data_path))

@allow_non_gpu(*delta_meta_allow)
@delta_lake
Expand All @@ -120,7 +124,11 @@ def test_delta_multi_part_write_round_trip_unmanaged(spark_tmp_path, gens):
lambda spark, path: spark.read.format("delta").load(path).filter("c='x'"),
data_path,
conf=copy_and_update(writer_confs, delta_writes_enabled_conf))
with_cpu_session(lambda spark: assert_gpu_and_cpu_delta_logs_equivalent(spark, data_path))
# Databricks will sometimes generate tons of tiny files on the CPU when using floating point
# partition keys. The GPU does not, and this triggers a delta log mismatch. Data contents
# of the table are correct, and this seems like Databricks bug on the CPU.
if not (is_databricks_runtime() and gens.data_type in (FloatType(), DoubleType())):
with_cpu_session(lambda spark: assert_gpu_and_cpu_delta_logs_equivalent(spark, data_path))

def do_update_round_trip_managed(spark_tmp_path, mode):
gen_list = [("x", int_gen), ("y", binary_gen), ("z", string_gen)]
Expand Down