maropu commented on issue #27872: [SPARK-31115][SQL] Detect known Janino bug 
janino-compiler/janino#113 and apply workaround automatically as a fail-back 
via avoid using switch statement in generated code
URL: https://github.com/apache/spark/pull/27872#issuecomment-599044117
 
 
   I think the option 4 looks fine to me. btw, splitting large code into pieces 
in `switch` is a solution for this issue? Additionally, we need to replace 
`switch` with `if`?
   
   > Modify ExpandExec to check the number of operations in for statement, and 
use if ~ else if when the number of operations exceed the threshold. This 
should be ideally checking the length of offset but it would be weird if Spark 
does it, so count the lines blindly. Performance regression may happen in some 
cases where it can run with switch but due to blind count it runs with if ~ 
else if, but the case wouldn't be common.
   
   I just want to know the actual performance numbers of this approach. I think 
splitting large code into small parts might improve performance.
   
   > I have one, but I cannot share since the query is from actual customer. If 
you're OK with just generated code, I've attached the file in Janino issue 
janino-compiler/janino#113.
   
   To reproduce the issue, could you build the simple query that you can show 
us based on your private customer's query? I think the query can make us 
understood more for the issue.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to