[INFRA] Document test base class hierarchy in AGENTS.md#55619
Draft
zhengruifeng wants to merge 1 commit intoapache:masterfrom
Draft
[INFRA] Document test base class hierarchy in AGENTS.md#55619zhengruifeng wants to merge 1 commit intoapache:masterfrom
zhengruifeng wants to merge 1 commit intoapache:masterfrom
Conversation
Add a "Test Base Classes" section to AGENTS.md describing the layered SparkFunSuite -> PlanTest -> QueryTest -> SharedSparkSession hierarchy, when to pick each base, common redundant-mixin patterns to avoid, and the linearization gotcha when the first item in an `extends` clause is a pure trait without the SparkFunSuite class chain. Generated-by: Claude opus-4-7
HyukjinKwon
approved these changes
Apr 30, 2026
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.
What changes were proposed in this pull request?
Add a
Test Base Classessection toAGENTS.mdthat describes the layered Scala test base hierarchy and when to pick each one:The new section covers:
ParquetTest,OrcTest,FileBasedDataSourceTest,DDLCommandTestUtilsalready extendQueryTestbut do not provide aSparkSession, so they are typically combined withSharedSparkSession.extends QueryTest with SharedSparkSession,extends QueryTest with ParquetTest) and which combinations are NOT redundant.extendsclause must transitively extendSparkFunSuite(an abstract class). Pure helper traits like*ErrorsBasedo not carry that chain, so putting one first breaks compilation.CLAUDE.mdis a symlink toAGENTS.md, so this change is picked up by both AI agent toolchains.Why are the changes needed?
Picking the wrong test base class or stacking redundant mixins is a common mistake when adding new Scala test suites. The information is currently spread across the source of
SparkFunSuite,PlanTest,QueryTest, andSharedSparkSession, with no single place that summarizes when to use which or what combinations are redundant. Documenting it inAGENTS.mdgives both contributors and AI coding agents a quick reference.Does this PR introduce any user-facing change?
No. Documentation-only change to a developer/agent guide file.
How was this patch tested?
N/A. Documentation-only change; no code or tests are affected.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude opus-4-7