-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix merge command
numTargetFilesAdded
metric
## Description This PR fixes a bug in `MergeIntoCommand` where the metric `numTargetFilesAdded` sometimes gave an unexpected value. This PR ensures that `MergeIntoCommand` only writes out new files to the target table that are non-empty (i.e. at least 1 row). Note: the value was never wrong, for example it would say that we wrote out 1 file, and we did in fact write out 1 empty file. However, there was no logical reason for us to write out an empty file with no rows. This PR also updates existing tests (which knew about this bug and so were ignored) inside of `MergeIntoMetricsBase`. ``` build/sbt 'core/testOnly *DescribeDeltaHistorySuite -- -z "merge-metrics"' ``` Closes #1334 Signed-off-by: Scott Sandre <scott.sandre@databricks.com> GitOrigin-RevId: 1c04cff75461ec1d2987653ad1a82dcbcf5926c1
- Loading branch information
1 parent
b71ad65
commit 5d22a38
Showing
2 changed files
with
27 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters