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-3944][Core] Using Option[String] where value of String can be null #2795

Closed
wants to merge 1 commit into from

Conversation

Shiti
Copy link
Contributor

@Shiti Shiti commented Oct 14, 2014

No description provided.

@Shiti Shiti changed the title [SPARK-3944][Core] Using Option[String] where value can be null [SPARK-3944][Core] Using Option[String] where value of String can be null Oct 14, 2014
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@ScrapCodes
Copy link
Member

Jenkins, test this please.

@ScrapCodes
Copy link
Member

Nice fix, LGTM. This is required by scala 2.11 too. @pwendell take a look ?

@pwendell
Copy link
Contributor

Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Oct 14, 2014

QA tests have started for PR 2795 at commit 46897d7.

  • This patch merges cleanly.

@SparkQA
Copy link

SparkQA commented Oct 14, 2014

QA tests have finished for PR 2795 at commit 46897d7.

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

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/21728/
Test PASSed.

@andrewor14
Copy link
Contributor

I see, this is for scala 2.11. LGTM, I'm merging this into master.

@asfgit asfgit closed this in 24b818b Oct 14, 2014
uri.getScheme match {
case "http" | "https" | "ftp" =>
Option(uri.getScheme) match {
case Some("http") | Some("https") | Some("ftp") =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for being late on this, but I'd really rather not see things like case Some("http") | Some("https") | Some("ftp") =>. Instead, I'd do this as:

Option(uri.getScheme).getOrElse("file") match {
  case "http" | "https" | "ftp" => ...
  case "file" => ...
  case _ =>
}

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