test: avoid duplicating functionality from base test classes#652
Merged
andrew-coleman merged 5 commits intomainfrom Jan 2, 2026
Merged
test: avoid duplicating functionality from base test classes#652andrew-coleman merged 5 commits intomainfrom
andrew-coleman merged 5 commits intomainfrom
Conversation
Prefer the extensions field. For access to the default extensions, use DefaultExtensionCatalog.DEFAULT_COLLECTION directly.
Member
Author
|
In the process of doing some other work, I found myself touching a lot of tests. Instead of complicating that PR, I've opted to improve the reuse of the base test classes. This PR doesn't modify any tests. It primarily removes redundant fields from test classes in favour of reusing fields in the base test classes. |
vbarua
commented
Dec 23, 2025
| protected ProtoRelConverter protoRelConverter = | ||
| new ProtoRelConverter(functionCollector, defaultExtensionCollection); | ||
|
|
||
| protected SubstraitBuilder sb; |
Member
Author
There was a problem hiding this comment.
I opted to use sb for SubstraitBuilder, which felt slightly more descriptive than b. A short-name is useful because when it's used, it's called frequently to build a plan component. A descriptive name like substraitBuilder ends up being noisy.
andrew-coleman
approved these changes
Jan 2, 2026
mbwhite
pushed a commit
to mbwhite/substrait-java
that referenced
this pull request
Jan 9, 2026
…it-io#652) * test: define and reuse substraitToCalcite in PlanTestBase * test: use SubstraitBuilders from base testing classes * test: make TestBase more reusable * test: remove defaultExtensionCollection from TestBase Prefer the extensions field. For access to the default extensions, use DefaultExtensionCatalog.DEFAULT_COLLECTION directly. * test: reuse base N and R TypeCreator when possible
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.
Uh oh!
There was an error while loading. Please reload this page.