-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26424][SQL][FOLLOWUP] Fix DateFormatClass/UnixTime codegen #23394
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
Conversation
|
cc @MaxGekk , @cloud-fan , @HyukjinKwon |
|
Thank you for review and approval, @HyukjinKwon . |
|
@dongjoon-hyun Thank you for the fix. Do you know are there any ways to run a PR branch on scala 2.11 in jenkins somehow. |
| val locale = ctx.addReferenceObj("locale", Locale.US) | ||
| defineCodeGen(ctx, ev, (timestamp, format) => { | ||
| s"""UTF8String.fromString($tf.apply($format.toString(), $tz, $locale) | ||
| s"""UTF8String.fromString($tf$$.MODULE$$.apply($format.toString(), $tz, $locale) |
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.
is apply a special case? IIRC java can call methods in scala object, just like calling static methods.
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 static methods are methods of the companion object, so yeah you need to access static methods like this in Java.
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.
which is pretty annoying when you access to it in Python side via Py4J .. !!
|
Test build #100497 has finished for PR 23394 at commit
|
|
Thank you, @HyukjinKwon , @MaxGekk , @cloud-fan , @srowen . |
## What changes were proposed in this pull request? This PR fixes the codegen bug introduced by apache#23358 . - https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/job/spark-master-test-maven-hadoop-2.7-ubuntu-scala-2.11/158/ ``` Line 44, Column 93: A method named "apply" is not declared in any enclosing class nor any supertype, nor through a static import ``` ## How was this patch tested? Manual. `DateExpressionsSuite` should be passed with Scala-2.11. Closes apache#23394 from dongjoon-hyun/SPARK-26424. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
## What changes were proposed in this pull request? This PR fixes the codegen bug introduced by apache#23358 . - https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test%20(Dashboard)/job/spark-master-test-maven-hadoop-2.7-ubuntu-scala-2.11/158/ ``` Line 44, Column 93: A method named "apply" is not declared in any enclosing class nor any supertype, nor through a static import ``` ## How was this patch tested? Manual. `DateExpressionsSuite` should be passed with Scala-2.11. Closes apache#23394 from dongjoon-hyun/SPARK-26424. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
This PR fixes the codegen bug introduced by #23358 .
How was this patch tested?
Manual.
DateExpressionsSuiteshould be passed with Scala-2.11.