Skip to content

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

Open
lee-ji-an wants to merge 3 commits into
apache:masterfrom
lee-ji-an:ZEPPELIN-6212
Open

[ZEPPELIN-6212] Fix IRInterpreterTest.testZShow() for R 4.0+ compatibility#5012
lee-ji-an wants to merge 3 commits into
apache:masterfrom
lee-ji-an:ZEPPELIN-6212

Conversation

@lee-ji-an

@lee-ji-an lee-ji-an commented Aug 5, 2025

Copy link
Copy Markdown

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

  • - Update test expectation to match R 4.0+ default behavior
  • - Ensure test passes on both R 3.x and R 4.x versions

What is the Jira issue?

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

@ParkGyeongTae

Copy link
Copy Markdown
Member

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!

@lee-ji-an lee-ji-an changed the title [ZEPPELIN-6212] Fix IRInterpreterTest.testZShow() for R 4.0+ compatib… [ZEPPELIN-6212] Fix IRInterpreterTest.testZShow() for R 4.0+ compatibility Aug 7, 2025
@lee-ji-an

Copy link
Copy Markdown
Author

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.

@jongyoul

jongyoul commented Aug 8, 2025

Copy link
Copy Markdown
Member

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

@lee-ji-an

lee-ji-an commented Aug 10, 2025

Copy link
Copy Markdown
Author

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

Comment thread testing/env_python_3.9_with_R_4.0.yml Outdated
- r-ggplot2
- r-irkernel
- r-shiny
- r-googlevis No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a newline at the end of this file.

@ParkGyeongTae ParkGyeongTae left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

assertEquals("<font color=red>Results are limited by 1 rows.</font>\n",
resultMessages.get(1).getData());
}
} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a blank line at the end of this file.

- r-ggplot2
- r-irkernel
- r-shiny
- r-googlevis

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a blank line at the end of this file.

- r-ggplot2
- r-irkernel
- r-shiny
- r-googlevis

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a blank line at the end of this file.

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.

3 participants