On Tue, Aug 18, 2015 at 1:19 PM, <saif.a.ell...@wellsfargo.com> wrote: > Hi, Can you please elaborate? I am confused :-)
You did note that the two pieces of code are different, right? See http://docs.scala-lang.org/tutorials/tour/pattern-matching.html for how to match things in Scala, especially the "typed pattern" example. > -----Original Message----- > From: Marcelo Vanzin [mailto:van...@cloudera.com] > Sent: Tuesday, August 18, 2015 5:15 PM > To: Ellafi, Saif A. > Cc: wrbri...@gmail.com; user@spark.apache.org > Subject: Re: Scala: How to match a java object???? > > On Tue, Aug 18, 2015 at 12:59 PM, <saif.a.ell...@wellsfargo.com> wrote: >> >> 5 match { case java.math.BigDecimal => 2 } > > 5 match { case _: java.math.BigDecimal => 2 } > > -- > Marcelo -- Marcelo --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org