forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-31389][SQL][TESTS] Add codegen-on test coverage for some tests…
… in SQLMetricsSuite ### What changes were proposed in this pull request? Adding missing unit tests in SQLMetricSuite to cover the code generated path. **Additional tests were added in the following unit tests.** Filter metrics, SortMergeJoin metrics, SortMergeJoin(outer) metrics, BroadcastHashJoin metrics, ShuffledHashJoin metrics, BroadcastHashJoin(outer) metrics, BroadcastNestedLoopJoin metrics, BroadcastLeftSemiJoinHash metrics, CartesianProduct metrics, SortMergeJoin(left-anti) metrics ### Why are the changes needed? The existing tests in SQLMetricSuite only cover the interpreted path. It is necessary for the tests to cover code generated path as well since CodeGenerated path is often used in production. The PR doesn't change test("Aggregate metrics") and test("ObjectHashAggregate metrics"). The test("Aggregate metrics") tests metrics when a HashAggregate is used. Enabling codegen forces the test to use ObjectHashAggregate rather than the regular HashAggregate. ObjectHashAggregate has a test of its own. Therefore, I feel these two tests need not enabling codegen is not necessary. ### Does this PR introduce any user-facing change? No ### How was this patch tested? I added debug statements in the code to make sure both Code generated and Interpreted paths are being exercised. I further used Intellij debugger to ensure that the newly added unit tests are in fact exercising both code generated and interpreted paths. Closes apache#28173 from sririshindra/SPARK-31389. Authored-by: rishi <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
- Loading branch information
1 parent
69f9ee1
commit 4f8b03d
Showing
2 changed files
with
109 additions
and
83 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