[ZEPPELIN-6212] Fix IRInterpreterTest.testZShow() for R 4.0+ compatibility
What is this PR for?
This PR fixes the IRInterpreterTest.testZShow() test failure caused by R 4.0+ default behavior change.
The test was failing because R 4.0+ changed the default stringsAsFactors from TRUE to FALSE, causing the test to expect numeric factor levels but receive actual string values.
What type of PR is it?
Bug Fix
Todos
- [x] - Update test expectation to match R 4.0+ default behavior
- [x] - Ensure test passes on both R 3.x and R 4.x versions
What is the Jira issue?
- Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN-6212
How should this be tested?
- Run
./mvnw test -pl rlang -Dtest=IRInterpreterTest#testZShow - Verify test passes on both R 3.x and R 4.x environments
Screenshots (if appropriate)
N/A
Questions:
- Does the license files need to update? No
- Is there breaking changes for older versions? No
- Does this needs documentation? No
Could you please update the PR title to be a complete sentence? This helps provide clearer context when browsing the commit or PR history. Thanks!
Could you please update the PR title to be a complete sentence? This helps provide clearer context when browsing the commit or PR history. Thanks!
Thank you for the review! I've updated the PR title to be a complete sentence as requested.
@lee-ji-an I think we'd better add a test case for both environments using github actions.
@lee-ji-an I think we'd better add a test case for both environments using github actions.
@jongyoul I agree that testing both R 3.x and R 4.x environments would provide better coverage. I'll add a GitHub Actions matrix to test both R versions and update the PR. Thank you for the thoughtful feedback!