Fix JDK version diff in RelationalGroupedDataset#14192
Merged
GaryShen2008 merged 5 commits intoNVIDIA:mainfrom Jan 26, 2026
Merged
Fix JDK version diff in RelationalGroupedDataset#14192GaryShen2008 merged 5 commits intoNVIDIA:mainfrom
GaryShen2008 merged 5 commits intoNVIDIA:mainfrom
Conversation
Signed-off-by: Gary Shen <gashen@nvidia.com>
Contributor
Greptile SummaryThis PR fixes JDK 11+ test failures in
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant TestRunner
participant RapidsTestSettings
participant RapidsDatasetSuite
participant getJavaMajorVersion
participant RelationalGroupedDataset
TestRunner->>RapidsTestSettings: Check test exclusions
RapidsTestSettings-->>TestRunner: Exclude original DatasetSuite tests
TestRunner->>RapidsDatasetSuite: Run testRapids version
RapidsDatasetSuite->>getJavaMajorVersion: Query JDK version
getJavaMajorVersion-->>RapidsDatasetSuite: Return major version (8 or 11+)
RapidsDatasetSuite->>RapidsDatasetSuite: Set expectedTypeString based on JDK
RapidsDatasetSuite->>RelationalGroupedDataset: Call toString()
RelationalGroupedDataset-->>RapidsDatasetSuite: Return formatted string
RapidsDatasetSuite->>RapidsDatasetSuite: Assert expected matches actual
|
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/utils/RapidsTestSettings.scala
Outdated
Show resolved
Hide resolved
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/utils/RapidsTestSettings.scala
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses JDK 11+ test failures in DatasetSuite by creating JDK-version-aware test cases for RelationalGroupedDataset.toString behavior. In JDK 11+, the toString method returns an empty string for the type field instead of "GroupBy".
Changes:
- Excluded two failing tests from the base DatasetSuite and replaced them with GPU-specific testRapids versions
- Added JDK version detection logic to handle the different toString behavior across JDK versions
- Created two new test cases in RapidsDatasetSuite that check for the correct output based on JDK version
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| tests/src/test/spark330/scala/org/apache/spark/sql/rapids/utils/RapidsTestSettings.scala | Excluded two original tests that fail on JDK 11+ and documented the reason for exclusion |
| tests/src/test/spark330/scala/org/apache/spark/sql/rapids/suites/RapidsDatasetSuite.scala | Added two testRapids cases with JDK version-aware assertions for RelationalGroupedDataset.toString behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/suites/RapidsDatasetSuite.scala
Outdated
Show resolved
Hide resolved
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/suites/RapidsDatasetSuite.scala
Outdated
Show resolved
Hide resolved
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/suites/RapidsDatasetSuite.scala
Outdated
Show resolved
Hide resolved
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/utils/RapidsTestSettings.scala
Outdated
Show resolved
Hide resolved
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/utils/RapidsTestSettings.scala
Outdated
Show resolved
Hide resolved
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/suites/RapidsDatasetSuite.scala
Outdated
Show resolved
Hide resolved
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/suites/RapidsDatasetSuite.scala
Outdated
Show resolved
Hide resolved
Collaborator
Author
|
build |
…s/RapidsTestSettings.scala Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Gary Shen <gashen@nvidia.com>
tests/src/test/spark330/scala/org/apache/spark/sql/rapids/suites/RapidsDatasetSuite.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Gary Shen <gashen@nvidia.com>
Signed-off-by: Gary Shen <gashen@nvidia.com>
Collaborator
Author
|
build |
thirtiseven
approved these changes
Jan 23, 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.
Another test case to use RelationalGroupedDataset.toString to expect the correct type string.
But in JDK11+ it returns empty string.
Created testRapids cases by checking JDK version to change the expected string.
Close #14188