New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-2785] [gelly] implements fromCsvReader for gelly-scala #1205
Conversation
* Creates a Graph with from a CSV file of vertices and a CSV file of edges | ||
* | ||
* @param pathVertices The file path containing the vertices. | ||
* @param vertexValue Defines whether the vertices have associated values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we rename this parameter to sth like readVertices :Boolean
and making it mandatory.
If readVertices
is set, pathVertices
must be specified. It also implies that there are vertex values (otherwise it would make no sense to read a vertex file, right?).
Hi, you might have noticed, I got a bit confused about the Otherwise the PR looks good. |
Thanks so much for the review @fhueske! |
I'm worrying about the name of method |
Hey @chiwanpark, |
Okay, I understand it. |
// This method exceeds the max allowed number of parameters --> | ||
def fromCsvReader[K: TypeInformation : ClassTag, VV: TypeInformation : ClassTag, | ||
EV: TypeInformation : ClassTag]( | ||
pathVertices: String = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change the order of the parameters and move the most common once first? This will allow to specify some parameters without names. How about:
- env (mandatory)
- pathEdges (mandatory)
- readVertices
- pathVertices
- hasEdgeValues
- ... (the others in the current order)
Thanks for the fast update! Good to merge. |
Great, thanks! I will re-order the parameters and merge. |
There was an error in |
…ts and docs This closes apache#1205
…ts and docs This closes apache#1205
This is the last method missing from the Scala Graph implementation.
In order to be as close as possible to the Java implementation, I implemented one method where different options are given with optional parameters. This resulted into the method exceeding the allowed max number of parameters, as defined in the scala checkstyle. I decided to disable the checkstyle for this particular method, because most of the parameters are optional and are there mainly for completeness. In the common case, a user would only give the path and delimiters. If you think there's a better way to do this without having to disable the checkstyle, let me know!