Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/706#discussion_r12508305
  
    --- Diff: project/SparkBuild.scala ---
    @@ -297,7 +273,7 @@ object SparkBuild extends Build {
       val chillVersion = "0.3.6"
       val codahaleMetricsVersion = "3.0.0"
       val jblasVersion = "1.2.3"
    -  val jets3tVersion = if 
("^2\\.[3-9]+".r.findFirstIn(hadoopVersion).isDefined) "0.9.0" else "0.7.1"
    +  val jets3tVersion = 
"^2\\.[3-9]+".r.findFirstIn(hadoopVersion).fold("0.7.1")(_ => "0.9.0")
    --- End diff --
    
    This is a tangential question. Is this more idiomatic scala? I've seen fold 
as an alternative to if-else or use of Option, but had thought it harder to 
understand.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to