zeppelin icon indicating copy to clipboard operation
zeppelin copied to clipboard

[ZEPPELIN-6212] Fix IRInterpreterTest.testZShow() for R 4.0+ compatibility

Open lee-ji-an opened this issue 4 months ago • 4 comments

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

lee-ji-an avatar Aug 05 '25 13:08 lee-ji-an

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!

ParkGyeongTae avatar Aug 06 '25 13:08 ParkGyeongTae

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 avatar Aug 07 '25 13:08 lee-ji-an

@lee-ji-an I think we'd better add a test case for both environments using github actions.

jongyoul avatar Aug 08 '25 14:08 jongyoul

@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!

lee-ji-an avatar Aug 10 '25 07:08 lee-ji-an