You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/07/15 10:32:33 UTC

[GitHub] [spark] singhpk234 opened a new pull request, #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

singhpk234 opened a new pull request, #37202:
URL: https://github.com/apache/spark/pull/37202

   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   upgrade janino to 3.1.7 from 3.0.16
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   - The proposed version contains bug fix in janino by @maropu.
      - https://github.com/janino-compiler/janino/pull/148
   - contains `getBytecodes` method which can be used to simplify the way to get bytecodes from ClassBodyEvaluator in CodeGenerator#updateAndGetCompilationStats method. (by @LuciferYang 's)
      - https://github.com/apache/spark/pull/32536
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   No
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   
   Existing UTs


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1186115509

   Can one of the admins verify this patch?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] singhpk234 commented on a diff in pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
singhpk234 commented on code in PR #37202:
URL: https://github.com/apache/spark/pull/37202#discussion_r922693898


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CodeGenerationSuite.scala:
##########
@@ -568,7 +568,6 @@ class CodeGenerationSuite extends SparkFunSuite with ExpressionEvalHelper {
     assert(refTerm.contains("scala.math.LowPriorityOrderingImplicits$$anon$"))
   }
 
-  // TODO (SPARK-35579): Fix this bug in janino and upgrade janino in Spark.

Review Comment:
   @srowen I think, when this bug was discovered we were at janino v3.1.4, ref [cloudfan's branch](https://github.com/cloud-fan/spark/tree/janino) for adding the UT in ignore mode, since the problem was only in 3.1.x branch of janino, we reverted back janino to 3.0.16 (3.0.x seems be deprecated as well [ref](https://github.com/janino-compiler/janino/pull/148#issuecomment-1085006136)). The [PR](https://github.com/apache/spark/pull/33302) to revert janino upgrade (3.1.4 -> 3.0.16), also enabled the UT since 3.0.x didn't had the issue.
   
   Now when we bump back 3.1.7 i.e use janino 3.1.x and this test passes implies 3.1.7 has this bug fix, and kind of validates version bump is safe. Thoughts ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] singhpk234 commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
singhpk234 commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1188352248

   Thanks @srowen @HyukjinKwon !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1186112970

   cc @rednaxelafx FYI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] rednaxelafx commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
rednaxelafx commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1189757594

   Post-hoc question: what's the main driving factor to upgrade from Janino 3.0.16 to the Janino 3.1.x line? Is it compilation speed driven, or generated bytecode size driven, or other misc goodies like the `getBytecodes` feature mentioned in this PR's description?
   
   If the main driving factor(s) are mostly cosmetic, then IMHO the risk/benefit ratio of the upgrading doesn't seem favorable yet at this point.
   cc @maropu asking for advice, are you confident that the stack map computation logic in the 3.1.x line are now stable enough for prime time? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on a diff in pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
srowen commented on code in PR #37202:
URL: https://github.com/apache/spark/pull/37202#discussion_r922684170


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CodeGenerationSuite.scala:
##########
@@ -568,7 +568,6 @@ class CodeGenerationSuite extends SparkFunSuite with ExpressionEvalHelper {
     assert(refTerm.contains("scala.math.LowPriorityOrderingImplicits$$anon$"))
   }
 
-  // TODO (SPARK-35579): Fix this bug in janino and upgrade janino in Spark.

Review Comment:
   Is there a test that should pass now after the fix?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen closed pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
srowen closed pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7
URL: https://github.com/apache/spark/pull/37202


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on a diff in pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
srowen commented on code in PR #37202:
URL: https://github.com/apache/spark/pull/37202#discussion_r922702427


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CodeGenerationSuite.scala:
##########
@@ -568,7 +568,6 @@ class CodeGenerationSuite extends SparkFunSuite with ExpressionEvalHelper {
     assert(refTerm.contains("scala.math.LowPriorityOrderingImplicits$$anon$"))
   }
 
-  // TODO (SPARK-35579): Fix this bug in janino and upgrade janino in Spark.

Review Comment:
   Oh I see, sounds good



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
srowen commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1187386282

   Merged to master


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] singhpk234 commented on a diff in pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
singhpk234 commented on code in PR #37202:
URL: https://github.com/apache/spark/pull/37202#discussion_r922693898


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CodeGenerationSuite.scala:
##########
@@ -568,7 +568,6 @@ class CodeGenerationSuite extends SparkFunSuite with ExpressionEvalHelper {
     assert(refTerm.contains("scala.math.LowPriorityOrderingImplicits$$anon$"))
   }
 
-  // TODO (SPARK-35579): Fix this bug in janino and upgrade janino in Spark.

Review Comment:
   @srowen I think, when this bug was discovered we were at janino v3.1.4, ref [cloudfan's branch](https://github.com/cloud-fan/spark/tree/janino) for adding the UT in ignore mode, since the problem was only in 3.1.x branch of janino, we reverted back janino to 3.0.16 (3.0.x seems be deprecated as well [ref](https://github.com/janino-compiler/janino/pull/148#issuecomment-1085006136)). The [PR](https://github.com/apache/spark/pull/33302) to revert janino upgrade (3.1.4 -> 3.0.16), also enabled the UT since 3.0.x didn't had the issue.
   
   Now when we bump back 3.1.7 i.e use janino 3.1.x and this test passes implies 3.1.7 has this bug fix, and kind of validates version bump is safe. WDYT ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] rednaxelafx commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
rednaxelafx commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1190554647

   Thank you very much for the reply!
   
   Janino 3.0.x is indeed deprecated, and the 3.0.16 release was a special case specifically done for Spark after some bugfixes were made on top of 3.0.15 from Spark contributors.
   
   That said, given previous attempts to upgrade to Janino 3.1.x line in Spark all hit various issues that ended up getting reverted, I don't feel particularly comfortable with the upgrade. The bug mentioned above https://github.com/janino-compiler/janino/issues/165 can be easily fixed on top of 3.0.16 too, although we already know there's unlikely going to be any new 3.0.x releases...
   
   There are many options here. I'm okay with this PR as-is, but in case we hit bugs with this version of Janino we may still want to roll back to 3.0.16 and try other options, e.g. forking or patching on top of 3.0.16.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] singhpk234 commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
singhpk234 commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1190251224

   > what's the main driving factor to upgrade from Janino 3.0.16 to the Janino 3.1.x line?
   
   3.0.x seems to be deprecated , there are other issues at janino like [issue](https://github.com/janino-compiler/janino/commit/0442075fd820069f784ef45ed001c8650317f0fe) i believe users of spark were hitting whose fix is only present in 3.1.x . Hence there was a comment posted in the [PR](https://github.com/janino-compiler/janino/pull/148)
   
   > @aunkrig or @maropu Was this ultimately fixed or worked around? 
   One of our users of https://github.com/apache/spark ran into 
   https://github.com/janino-compiler/janino/issues/165 which is fixed now in Janino. 
   But I see that Spark still uses 3.0.x deprecated line of Janino due to this issue. 
   It would be great if Spark can be upgraded to Janino 3.1.x!
   
   Hence considering the above and the conversations that followed in pr above, I raised this change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1190596847

   Thank you, @rednaxelafx . Sure, we will in case of any regression.
   > in case we hit bugs with this version of Janino we may still want to roll back to 3.0.16 and try other options, e.g. forking or patching on top of 3.0.16.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #37202: [SPARK-35579][SQL] Bump janino to 3.1.7

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #37202:
URL: https://github.com/apache/spark/pull/37202#issuecomment-1187685053

   Thank you all!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org