1

So I had a typo of dataframe.write.mode(SaveMode.Overwrite)text(output) missing a period between mode and text, but eclipse doesn't seem to complain, and when I run it through Junit and production, everything seems to run fine without exception, even producing correct output. I am confused that there wasn't any bug, and my Spark DAG does show that my code has changed, so I am more confused. Any ideas?

THIS USER NEEDS HELP
  • 3,136
  • 4
  • 30
  • 55
  • 1
    Possible duplicate of [What are the precise rules for when you can omit parenthesis, dots, braces, = (functions), etc.?](http://stackoverflow.com/questions/1181533/what-are-the-precise-rules-for-when-you-can-omit-parenthesis-dots-braces-f) –  Oct 28 '16 at 17:31

1 Answers1

4

It is just the way scala works. It's the Infix notation

A white space is not required because of the parentheses. Here is a demonstration :

scala> val l = List(1,2,3)
l: List[Int] = List(1, 2, 3)

scala> l.take(1)
res4: List[Int] = List(1)

scala> l take 1
res5: List[Int] = List(1)

scala> (l)take 1
res6: List[Int] = List(1)

scala> l.take(2)take(1)
res7: List[Int] = List(1)
cheseaux
  • 5,187
  • 31
  • 50