Skip to content
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

[SPARK-32873][BUILD] Fix code which causes error when build with sbt and Scala 2.13 #29745

Closed

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Sep 14, 2020

What changes were proposed in this pull request?

This PR fix code which causes error when build with sbt and Scala 2.13 like as follows.

[error] [warn] /home/kou/work/oss/spark-scala-2.13/external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/KafkaRDD.scala:251: method with a single empty parameter list overrides method without any parameter list                                                                
[error] [warn]   override def hasNext(): Boolean = requestOffset < part.untilOffset                                                               
[error] [warn]                                                                                                                                    
[error] [warn] /home/kou/work/oss/spark-scala-2.13/external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/KafkaRDD.scala:294: method with a single empty parameter list overrides method without any parameter list                                                                
[error] [warn]   override def hasNext(): Boolean = okNext    

More specifically, what this PR fixes are

  • Methods which has an empty parameter list and overrides an method which has no parameter list.
override def hasNext(): Boolean = okNext
  • Methods which has no parameter list and overrides an method which has an empty parameter list.
      override def next: (Int, Double) = {
  • Infix operator expression that the operator wraps.
    3L * math.min(k, numFeatures) * math.min(k, numFeatures)
    3L * math.min(k, numFeatures) * math.min(k, numFeatures) +
    + math.max(math.max(k, numFeatures), 4L * math.min(k, numFeatures)
      math.max(math.max(k, numFeatures), 4L * math.min(k, numFeatures) *
    * math.min(k, numFeatures) + 4L * math.min(k, numFeatures))

Why are the changes needed?

For building Spark with sbt and Scala 2.13.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

After this change and #29742 applied, compile passed with the following command.

build/sbt -Pscala-2.13  -Phive -Phive-thriftserver -Pyarn -Pkubernetes compile test:compile

@kiszk
Copy link
Member

kiszk commented Sep 14, 2020

Good catch
nit: Spark 2.13 -> Scala 2.13 in the description

@sarutak
Copy link
Member Author

sarutak commented Sep 14, 2020

@kiszk

nit: Spark 2.13 -> Scala 2.13 in the description

Haha, I was confused. Thanks!

@HyukjinKwon
Copy link
Member

Merged to master.

@SparkQA
Copy link

SparkQA commented Sep 14, 2020

Test build #128615 has finished for PR 29745 at commit d83794b.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants