Address review comments: replace FQN with imports, parameterize tests#5
Closed
yihua wants to merge 1 commit into
Closed
Conversation
- SparkHoodieTableFileIndex: add `DataType` and `LinkedHashMap` imports, drop the inline fully-qualified references in `NestedFieldNode` and `buildNestedPartitionSchema`. - TestCOWDataSource: add imports for `LogicalRelation`, `HadoopFsRelation`, `HoodieFileIndex`, `HoodieBaseRelation`; drop FQN in `runNestedFieldPartitionTest`. - TestHoodieFileIndex: collapse six `testBuildNestedPartitionSchema*` cases into a single `@ParameterizedTest` driven by `buildNestedPartitionSchemaCases`; collapse three `testExtractNestedPartitionFilters*` cases into `extractNestedPartitionFiltersCases`. Keeps the conflict-throws case as a focused `@Test`.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the issue this Pull Request addresses
Follow-up to review comments on apache#18126, specifically apache#18126 (review) and the test-redundancy discussion. Targets your PR branch so the changes flow into apache#18126.
Summary and Changelog
SparkHoodieTableFileIndex: importDataTypeandLinkedHashMapat the top of the file; drop the inlineorg.apache.spark.sql.types.DataType/scala.collection.mutable.LinkedHashMapqualifiers inNestedFieldNodeandbuildNestedPartitionSchema.TestCOWDataSource: importLogicalRelation,HadoopFsRelation,HoodieFileIndex,HoodieBaseRelation; drop the inline FQN usages inrunNestedFieldPartitionTest.TestHoodieFileIndex: collapse 6testBuildNestedPartitionSchema*cases into a single@ParameterizedTestdriven bybuildNestedPartitionSchemaCases, and 3testExtractNestedPartitionFilters*cases intoextractNestedPartitionFiltersCases. The conflict-throws case stays as a focused@Testsince its shape differs.Net change: -100 / +86 (mostly test consolidation).
Impact
Test-only and import-style refactor. No behavior change.
Risk Level
none
Documentation Update
none
Contributor's checklist