Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-35253][SQL][BUILD] Bump up the janino version to v3.1.4 #32455

Closed
wants to merge 2 commits into from

Conversation

maropu
Copy link
Member

@maropu maropu commented May 6, 2021

What changes were proposed in this pull request?

This PR proposes to bump up the janino version from 3.0.16 to v3.1.4.
The major changes of this upgrade are as follows:

For all the changes, please see the change log: http://janino-compiler.github.io/janino/changelog.html

NOTE1: I've checked that there is no obvious performance regression. For all the data, see a link: https://docs.google.com/spreadsheets/d/1srxT9CioGQg1fLKM3Uo8z1sTzgCsMj4pg6JzpdcG6VU/edit?usp=sharing

NOTE2: We upgraded janino to 3.1.2 (#27860) once before, but the commit had been reverted in #29495 because of the correctness issue. Recently, #32374 had checked if Spark could land on v3.1.3 or not, but a new bug was found there. These known issues has been fixed in v3.1.4 by following PRs:

Why are the changes needed?

janino v3.0.X is no longer maintained.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

GA passed.

@maropu maropu marked this pull request as draft May 6, 2021 14:07
@maropu
Copy link
Member Author

maropu commented May 6, 2021

I've fixed some issues in janino and the latest janino (w/ these fixes) has been released hours ago.

I will check if the existing tests can pass and there is no TPCDS performance regression.

@SparkQA
Copy link

SparkQA commented May 6, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42735/

@dongjoon-hyun
Copy link
Member

Thank you, @maropu . Yes, it will be great if we can succeed to upgrade at this time.

@kiszk
Copy link
Member

kiszk commented May 6, 2021

It would be great if we could check some compilation time.
Janino may have degradation regarding the compilation time like #29495 (comment)

@SparkQA
Copy link

SparkQA commented May 6, 2021

Test build #138213 has finished for PR 32455 at commit 2742916.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya
Copy link
Member

viirya commented May 6, 2021

Looks like all tests are passed!

@maropu maropu changed the title [WIP][SPARK-XXXXX][SQL][BUILD] Bump up the janino version to v3.1.4(latest) [WIP][SPARK-35253][SQL][BUILD] Bump up the janino version to v3.1.4(latest) May 6, 2021
@SparkQA
Copy link

SparkQA commented May 7, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42741/

@SparkQA
Copy link

SparkQA commented May 7, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/42741/

@SparkQA
Copy link

SparkQA commented May 7, 2021

Test build #138219 has finished for PR 32455 at commit 8a13cfb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

cc @rednaxelafx too FYI

@maropu maropu changed the title [WIP][SPARK-35253][SQL][BUILD] Bump up the janino version to v3.1.4(latest) [SPARK-35253][SQL][BUILD] Bump up the janino version to v3.1.4(latest) May 7, 2021
@maropu maropu marked this pull request as ready for review May 7, 2021 12:29
@maropu
Copy link
Member Author

maropu commented May 7, 2021

okay, as far as I checked, I couldn't find any critical problem. I think it is good timing to re-start the discussion to decide whether we upgrade janino or not for the next release (v3.2.0). WDYT, guys? @gatorsmile @cloud-fan @HyukjinKwon @dongjoon-hyun @viirya @kiszk @rednaxelafx @HeartSaVioR @gengliangwang @tgravescs @LuciferYang (I've listed up the members who participated in the previous discussions)

@tgravescs
Copy link
Contributor

3.2.0 sounds fine to me. From the description it seems like the issue in https://issues.apache.org/jira/browse/SPARK-32640 was fixed with janino-compiler/janino#145 so I'm good with it. It might be nice to add a test like SPARK-32640 if we don't have one yet.

@viirya
Copy link
Member

viirya commented May 7, 2021

There was a test added in SPARK-32640. So looks it is fixed now as all tests are passed. If no regression found, looks okay.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-35253][SQL][BUILD] Bump up the janino version to v3.1.4(latest) [SPARK-35253][SQL][BUILD] Bump up the janino version to v3.1.4 May 7, 2021
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM from my side.

@rednaxelafx
Copy link
Contributor

I'll do some experiments in my environment as well. Thank you very much for all the efforts driving the Janino upgrade, @maropu san!

Copy link
Member

@gengliangwang gengliangwang left a comment

Choose a reason for hiding this comment

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

+1. I just tried it locally and the bug described in https://issues.apache.org/jira/browse/SPARK-32640 is fixed.
Thanks for the work.

@srowen
Copy link
Member

srowen commented May 9, 2021

Yes I'd update to get all those fixes if there's no reason to expect a problem now.

val resultField = classOf[SimpleCompiler].getDeclaredField("result")
resultField.setAccessible(true)
val loader = resultField.get(evaluator).asInstanceOf[ByteArrayClassLoader]
val scField = classOf[ClassBodyEvaluator].getDeclaredField("sc")
Copy link
Contributor

Choose a reason for hiding this comment

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

@maropu Can we directly use evaluator.getBytecodes.asScala instead of line 1438 ~ line 1445?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is the data the totally same with ByteArrayClassLoader.classes? The suggestion is a trivial update though, IMO this PR just focuses on the janino upgrade. Could you make a follow-up PR for it after this merged?

Copy link
Contributor

Choose a reason for hiding this comment

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

@maropu ok, I can try to do this followup :)

@srowen srowen closed this in 101b0cc May 12, 2021
@srowen
Copy link
Member

srowen commented May 12, 2021

Merged to master

@maropu
Copy link
Member Author

maropu commented May 13, 2021

Thank you, all the reviewers~

@maropu
Copy link
Member Author

maropu commented Jul 12, 2021

@cloud-fan @HyukjinKwon As you know, the janino community is pretty inactive now. So, I'm wondering if it would be better to revert this commit from branch-3.2 before the QA period. WDYT? cc: @dongjoon-hyun @viirya

@LuciferYang
Copy link
Contributor

@maropu If we need to revert this commit, remember to revert SPARK-35398 first

@srowen
Copy link
Member

srowen commented Jul 12, 2021

What's the need to revert it?

@cloud-fan
Copy link
Contributor

Because the new janino version has bugs that can fail certain SQL queries, which is a regression.

@srowen
Copy link
Member

srowen commented Jul 12, 2021

Sounds good, revert it

@cloud-fan
Copy link
Contributor

I'll open a revert PR soon. If janino can have a new release with the bug fixed before rc1, we can revert my revert.

@dongjoon-hyun
Copy link
Member

+1 for reverting, too.

@gengliangwang
Copy link
Member

+1 for reverting. Thank you @maropu @cloud-fan

@viirya
Copy link
Member

viirya commented Jul 12, 2021

+1 for reverting it. Thanks!

@cloud-fan
Copy link
Contributor

The PR is out: #33302

HyukjinKwon pushed a commit that referenced this pull request Jul 13, 2021
…sion to v3.1.4"

### What changes were proposed in this pull request?

This PR reverts #32455 and its followup #32536 , because the new janino version has a bug that is not fixed yet: janino-compiler/janino#148

### Why are the changes needed?

avoid regressions

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

existing tests

Closes #33302 from cloud-fan/revert.

Authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
HyukjinKwon pushed a commit that referenced this pull request Jul 13, 2021
…sion to v3.1.4"

### What changes were proposed in this pull request?

This PR reverts #32455 and its followup #32536 , because the new janino version has a bug that is not fixed yet: janino-compiler/janino#148

### Why are the changes needed?

avoid regressions

### Does this PR introduce _any_ user-facing change?

no

### How was this patch tested?

existing tests

Closes #33302 from cloud-fan/revert.

Authored-by: Wenchen Fan <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
(cherry picked from commit ae6199a)
Signed-off-by: Hyukjin Kwon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.