-
Notifications
You must be signed in to change notification settings - Fork 244
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
Add support for StringConcatFactory.makeConcatWithConstants (#9555) #10057
Conversation
Signed-off-by: Sean Lee <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! It needs copyright updated, but the catalyst it produces matches what we did in JDK8/2.12.
One thing separate from this PR we might consider is to try and simplify the concat catalyst expressions. With JDK8/scala 2.12 and with JDK11/scala 2.13 I see the same thing:
I think the concats cold be slightly simpler to remove that first empty string:
The code we are generating does the right thing, I am just saying it could be improved. @seanprime7 would this be an easy change? And it's ok for us to file an issue and do as a follow on, especially since it was already there before. |
Signed-off-by: Sean Lee <[email protected]>
I've made a change not to generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The optimization (for empty space concat) only went to scala 2.13, but that should be fine (the old code has been there for a long time).
build |
@seanprime7 so I tried the optimization, but the catalyst plan looks the same?
I'd rather split that off to a different issue, and back-out 047b416, we can take a look at it later for both scala 2.12 and 2.13. Thoughts? |
047b416
to
43a2292
Compare
047b416 has been backed out |
build |
thanks @seanprime7 |
This PR adds support for
StringConcatFactory.makeConcatWithConstants
.4 of the existing unit tests started failing with JDK11 as the bytecode generation target due to the introduction of
StringConcatFactory.makeConcatWithConstants
in JDK9.See #9555 for more details about the failures.
It resolves #9555