Skip to content

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

Closed
maropu wants to merge 2 commits into
apache:masterfrom
maropu:janino_v3.1.4
Closed

[SPARK-35253][SQL][BUILD] Bump up the janino version to v3.1.4#32455
maropu wants to merge 2 commits into
apache:masterfrom
maropu:janino_v3.1.4

Conversation

@maropu

@maropu maropu commented May 6, 2021

Copy link
Copy Markdown
Member

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

maropu commented May 6, 2021

Copy link
Copy Markdown
Member Author

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

SparkQA commented May 6, 2021

Copy link
Copy Markdown

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
Copy Markdown
Member

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

@kiszk

kiszk commented May 6, 2021

Copy link
Copy Markdown
Member

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

@SparkQA

SparkQA commented May 6, 2021

Copy link
Copy Markdown

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

viirya commented May 6, 2021

Copy link
Copy Markdown
Member

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

SparkQA commented May 7, 2021

Copy link
Copy Markdown

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

@SparkQA

SparkQA commented May 7, 2021

Copy link
Copy Markdown

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

@SparkQA

SparkQA commented May 7, 2021

Copy link
Copy Markdown

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
Copy Markdown
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

maropu commented May 7, 2021

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

viirya commented May 7, 2021

Copy link
Copy Markdown
Member

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

@dongjoon-hyun dongjoon-hyun 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.

+1, LGTM from my side.

@rednaxelafx

Copy link
Copy Markdown
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!

@gengliangwang gengliangwang 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.

+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

srowen commented May 9, 2021

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

srowen commented May 12, 2021

Copy link
Copy Markdown
Member

Merged to master

@maropu

maropu commented May 13, 2021

Copy link
Copy Markdown
Member Author

Thank you, all the reviewers~

@maropu

maropu commented Jul 12, 2021

Copy link
Copy Markdown
Member Author

@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
Copy Markdown
Contributor

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

@srowen

srowen commented Jul 12, 2021

Copy link
Copy Markdown
Member

What's the need to revert it?

@cloud-fan

Copy link
Copy Markdown
Contributor

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

@srowen

srowen commented Jul 12, 2021

Copy link
Copy Markdown
Member

Sounds good, revert it

@cloud-fan

Copy link
Copy Markdown
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
Copy Markdown
Member

+1 for reverting, too.

@gengliangwang

Copy link
Copy Markdown
Member

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

@viirya

viirya commented Jul 12, 2021

Copy link
Copy Markdown
Member

+1 for reverting it. Thanks!

@cloud-fan

Copy link
Copy Markdown
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 <wenchen@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
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 <wenchen@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
(cherry picked from commit ae6199a)
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
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.