Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

[S2GRAPH-130]: Edge.propsWithTs data type should be changed into mutable to support setter interface exist in tp3. #100

Merged
merged 5 commits into from Nov 30, 2016

Conversation

SteamShon
Copy link
Contributor

  • Change data type of Edge.propsWithTs to java.util.Map.
  • Make Vertex/Edge/Graph to implement Tinkerpop3 structure interface.

Note that this PR based on #99 PR.

…ble to support setter interface exist in tp3.

 - Make Vertex/Edge/Graph to implement Tinkerpop3.
 - Change data type of Edge's propsWithTs to java.util.Map[String, S2Property[_]].
- change colId into ServiceColumn in VertexId.
val iter = props.entrySet().iterator()
while (iter.hasNext) {
val e = iter.next()
if (e.getValue.ts > lastDeletedAt) ret = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The while statement does not terminate the loop even if the condition '(e.getValue.ts> lastDeletedAt)' is satisfied.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you are suggesting to break when we first meet (e.getValue.ts > lastDeletedAt) condition. then I will fix on this part to break early on while loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daewon I just fixed it. can you review this again?

@daewon
Copy link
Contributor

daewon commented Nov 29, 2016

When you add a field, you should not forget to modify the function such as 'equals', 'hashcode', etc.

It would be nice if a test for this would be added.

I'm a little sorry to lose the advantage of the 'case class' provided by scala, but I think there is more to be gained when you support 'tinkerpop' as a native.

+1

@HyunsungJo
Copy link
Contributor

  • Why not remove all the code lines that were commented out?
  • Will the removed tests be replaced in the future? Some of them seem to be rather critical test cases (EdgeTest, IndexEdgeTest, etc.)

@SteamShon
Copy link
Contributor Author

@daewon actually adding equals, hashCode, toString for Edge/Vertex/S2Property/S2VertexProperty class reside on different PR #101.

@HyunsungJo I will remove commented out codes. About EdgeTest, IndexEdgeTest, I think #101 has necessary code for them(just the methods @daewon mentioned above).

Sorry for splitting up same logical commit into different PR(I found out this while I was working on #101 ^^;;). Maybe I will fix up removed test cases(EdgeTest, IndexEdgeTest, etc) on #101.

@asfgit asfgit merged commit 72b3ebd into apache:master Nov 30, 2016
asfgit pushed a commit that referenced this pull request Nov 30, 2016
…ble to support setter interface exist in tp3.

JIRA:
  [S2GRAPH-130] https://issues.apache.org/jira/browse/S2GRAPH-130

Pull Request:
  Closes #100

Authors
  DO YUNG YOON: steamshon@apache.org
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants