Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented May 2, 2016

What changes were proposed in this pull request?

This PR removes a stale TODO comment in GraphGenerators.scala

How was this patch tested?

Just comment removed.

@SparkQA
Copy link

SparkQA commented May 2, 2016

Test build #57522 has finished for PR 12839 at commit 8ef3f3b.

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

@srowen
Copy link
Member

srowen commented May 2, 2016

I disagree with this. Quadrants are conventionally referred to by number (really, 1-4 not 0-3, but hey) rather than a letter. This is a private API anyway. I don't think this is improved with an enum.

@dongjoon-hyun
Copy link
Member Author

Hi, @srowen . Thank you for review!
Then, may I just update this PR by simply removing the TODO comments?

// TODO(crankshaw) turn result into an enum (or case class for pattern matching}

Actually what I wanted to do was removing that long-lasting TODO comment. :)

@srowen
Copy link
Member

srowen commented May 2, 2016

I personally favor trivially resolving this by removing the TODO. I don't recognize the ABCD notation for quadrants anyway.

@dongjoon-hyun
Copy link
Member Author

Oh, actually, the ABCD notation comes from the description of that function.
https://github.com/dongjoon-hyun/spark/blob/SPARK-15057/graphx/src/main/scala/org/apache/spark/graphx/util/GraphGenerators.scala#L181

   * <pre>
   *
   *          dst ->
   * (x,y) ***************  _
   *       |      |      |  |
   *       |  a   |  b   |  |
   *  src  |      |      |  |
   *   |   ***************  | T
   *  \|/  |      |      |  |
   *       |   c  |   d  |  |
   *       |      |      |  |
   *       ***************  -
   * </pre>

@srowen
Copy link
Member

srowen commented May 2, 2016

That makes more sense, OK. It's not referring to the usual quadrant I - IV in the plane. I think that's still not the recommended way to make enums in Scala (?) and may simply not be worth changing now, IMHO.

@dongjoon-hyun
Copy link
Member Author

Sure. I just thought enum improves the return and match exhaustiveness, but I agree with your opinion, too.
I'll update this PR for just removing TODO.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-15057][GRAPHX] Use enum Quadrant in GraphGenerators [SPARK-15057][GRAPHX] Remove stale TODO comment for making enum in GraphGenerators May 2, 2016
@dongjoon-hyun
Copy link
Member Author

Thank you for making decision for this PR, @srowen .
I updated the PR and JIRA accordingly. Now, this just removes comment.

@dongjoon-hyun
Copy link
Member Author

Could you merge this PR, @srowen ?

@SparkQA
Copy link

SparkQA commented May 2, 2016

Test build #57547 has finished for PR 12839 at commit dd9b008.

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

@srowen
Copy link
Member

srowen commented May 3, 2016

OK, merged to master

@asfgit asfgit closed this in 46965cd May 3, 2016
@dongjoon-hyun
Copy link
Member Author

Thank you, @srowen .

@dongjoon-hyun dongjoon-hyun deleted the SPARK-15057 branch May 12, 2016 01:00
@rxin
Copy link
Contributor

rxin commented May 20, 2016

Since this is very low risk, I'm going to cherry-pick this in branch-2.0 too to minimize the diff.

asfgit pushed a commit that referenced this pull request May 20, 2016
…GraphGenerators

This PR removes a stale TODO comment in `GraphGenerators.scala`

Just comment removed.

Author: Dongjoon Hyun <dongjoon@apache.org>

Closes #12839 from dongjoon-hyun/SPARK-15057.

(cherry picked from commit 46965cd)
Signed-off-by: Reynold Xin <rxin@databricks.com>
@dongjoon-hyun
Copy link
Member Author

Thank you, @rxin . :)

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.

4 participants