Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Dec 28, 2018

What changes were proposed in this pull request?

This PR fixes the codegen bug introduced by #23358 .

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.

@dongjoon-hyun
Copy link
Member Author

cc @MaxGekk , @cloud-fan , @HyukjinKwon

@dongjoon-hyun
Copy link
Member Author

Thank you for review and approval, @HyukjinKwon .

@MaxGekk
Copy link
Member

MaxGekk commented Dec 28, 2018

@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)
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Member

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 .. !!

@SparkQA
Copy link

SparkQA commented Dec 28, 2018

Test build #100497 has finished for PR 23394 at commit 4a64823.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Dec 28, 2018

Thank you, @HyukjinKwon , @MaxGekk , @cloud-fan , @srowen .
Merged to master.

@asfgit asfgit closed this in e0054b8 Dec 28, 2018
@dongjoon-hyun dongjoon-hyun deleted the SPARK-26424 branch December 28, 2018 19:39
holdenk pushed a commit to holdenk/spark that referenced this pull request Jan 5, 2019
## 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]>
jackylee-ch pushed a commit to jackylee-ch/spark that referenced this pull request Feb 18, 2019
## 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants