Skip to content

ORC-2227: Apply spotless import rules to test sources and remove stale checkstyle suppressions - #2723

Open
cxzl25 wants to merge 2 commits into
apache:mainfrom
cxzl25:ORC-2227
Open

cxzl25 wants to merge 2 commits into
apache:mainfrom
cxzl25:ORC-2227

Conversation

@cxzl25

@cxzl25 cxzl25 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR makes the import checks that already apply to src/java also apply to src/test, and cleans up the test sources accordingly.

Why are the changes needed?

Bringing test sources under the same spotless rules as main sources makes this automatic and self-fixing via spotless:apply, and lets the obsolete checkstyle suppressions go.

How was this patch tested?

GHA

Was this patch authored or co-authored using generative AI tooling?

No

@cxzl25
cxzl25 requested a balanced review from Copilot October 23, 2026 07:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

No open issues 🎉

What changed in this PR

Extends Spotless import/order checks to Java test sources and updates test files accordingly, allowing removal of now-obsolete Checkstyle suppressions.

Changes:

  • Configure Spotless to include src/test/**/*.java alongside src/java/**/*.java.
  • Clean up test sources to comply with import rules (remove unused imports, reorder imports, replace wildcard/static-star imports).
  • Remove stale Checkstyle suppressions related to test import ordering/star imports.
File Description
java/​pom.xml Extends Spotless include patterns to cover test sources.
java/​checkstyle-suppressions.xml Removes suppressions that are no longer needed once Spotless enforces test imports.
java/​tools/​src/​test/​org/​apache/​orc/​tools/​TestRowCount.java Removes unused import to satisfy import checks.
java/​tools/​src/​test/​org/​apache/​orc/​tools/​TestFileDump.java Removes unused import to satisfy import checks.
java/​tools/​src/​test/​org/​apache/​orc/​tools/​TestColumnSizes.java Removes unused import to satisfy import checks.
java/​tools/​src/​test/​org/​apache/​orc/​tools/​TestCheckTool.java Removes unused import to satisfy import checks.
java/​shims/​src/​test/​org/​apache/​orc/​impl/​TestHadoopShimsPost3_3_4.java Replaces static wildcard import with explicit imports.
java/​core/​src/​test/​org/​apache/​orc/​impl/​reader/​TestStripePlanner.java Removes unused import to satisfy import checks.
java/​core/​src/​test/​org/​apache/​orc/​impl/​filter/​TestPluginFilterService.java Reorders imports and adjusts static import ordering.
java/​core/​src/​test/​org/​apache/​orc/​impl/​TestZstd.java Fixes import grouping/order to match rules.
java/​core/​src/​test/​org/​apache/​orc/​impl/​TestWriterImpl.java Replaces wildcard import with explicit imports and adjusts static import ordering.
java/​core/​src/​test/​org/​apache/​orc/​impl/​TestStringDictionaryTreeReader.java Reorders imports and removes unused import.
java/​core/​src/​test/​org/​apache/​orc/​impl/​TestRecordReaderUtils.java Reorders static imports to match rules.
java/​core/​src/​test/​org/​apache/​orc/​impl/​TestRecordReaderImpl.java Reorders static imports to match rules.
java/​core/​src/​test/​org/​apache/​orc/​impl/​TestReaderImpl.java Reorders imports to match rules.
java/​core/​src/​test/​org/​apache/​orc/​impl/​TestBrotli.java Replaces static wildcard import with explicit imports.
java/​core/​src/​test/​org/​apache/​orc/​impl/​TestBitPack.java Reorders imports to match rules.
java/​core/​src/​test/​org/​apache/​orc/​TestOrcWithLargeStripeStatistics.java Removes extra blank import separator line.
java/​core/​src/​test/​org/​apache/​orc/​TestOrcGeospatial.java Removes unused imports and replaces static wildcard import with explicit imports.
java/​core/​src/​test/​org/​apache/​orc/​TestOrcFilterContext.java Reorders imports to match rules.
java/​core/​src/​test/​org/​apache/​orc/​TestOrcConf.java Adjusts static import order to match rules.
java/​core/​src/​test/​org/​apache/​orc/​TestColumnStatistics.java Replaces star import with explicit imports to satisfy rules.
java/​bench/​core/​src/​test/​org/​apache/​orc/​bench/​core/​filter/​TestFilter.java Reorders imports to match rules.

Review effort: Lite

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants