Skip to content

Conversation

@vanzin
Copy link
Contributor

@vanzin vanzin commented Mar 7, 2017

Add parentheses so that both lines form a single statement; also add
a log message so that the issue becomes more explicit if it shows up
again.

Tested manually with integration test that exercises the feature.

Add parentheses so that both lines form a single statement; also add
a log message so that the issue becomes more explicit if it shows up
again.

Tested manually with integration test that exercises the feature.
@squito
Copy link
Contributor

squito commented Mar 7, 2017

lgtm

I couldn't believe this at first, I had to verify by running this for myself:

scala> :paste
// Entering paste mode (ctrl-D to finish)
val x = 7
  - 1
// Exiting paste mode, now interpreting.

x: Int = 7
res0: Int = -1

@SparkQA
Copy link

SparkQA commented Mar 7, 2017

Test build #74143 has finished for PR 17198 at commit 2cfc48f.

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

@mridulm
Copy link
Contributor

mridulm commented Mar 7, 2017

This is one of the scarey bugs I see in scala code ... the benefits of an explicit delimiter !
Wondering if it is possible to generalize this as a scala style check ...

LGTM

@srowen
Copy link
Member

srowen commented Mar 7, 2017

Scalac flags some forms of this as does IJ but here the dangling line had a side effect so isn't obvious it isn't on purpose to the analyzer I guess

@vanzin
Copy link
Contributor Author

vanzin commented Mar 8, 2017

Merging to master / 2.1.

asfgit pushed a commit that referenced this pull request Mar 8, 2017
Add parentheses so that both lines form a single statement; also add
a log message so that the issue becomes more explicit if it shows up
again.

Tested manually with integration test that exercises the feature.

Author: Marcelo Vanzin <[email protected]>

Closes #17198 from vanzin/SPARK-19857.

(cherry picked from commit 8e41c2e)
Signed-off-by: Marcelo Vanzin <[email protected]>
@asfgit asfgit closed this in 8e41c2e Mar 8, 2017
@jerryshao
Copy link
Contributor

Thanks @vanzin for this fix. Sorry to bring in this bug, haven't noticed this Scala formatting issue before.

@vanzin vanzin deleted the SPARK-19857 branch April 11, 2017 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants