-
Notifications
You must be signed in to change notification settings - Fork 29
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
[q3KTZ83O] Remove strange clean up method #517
Conversation
026e9aa
to
06bccbf
Compare
@@ -196,7 +196,7 @@ private void writeNodesBulkImport(Reporter reporter, ExportConfig config, Export | |||
return joinLabels(entrySet.getKey(), config.getArrayDelim()); | |||
} | |||
String prop = s.split(":")[0]; | |||
return "".equals(prop) ? String.valueOf(getNodeId(tx, n.getElementId())) : cleanPoint(FormatUtils.toString(n.getProperty(prop, ""))); | |||
return prop.isEmpty() ? String.valueOf(getNodeId(tx, n.getElementId())) : FormatUtils.toString(n.getProperty(prop, "")); |
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.
I believe the condition prop.isEmpty()
can never be false?
scala> val prop = "".split(":")
val prop: Array[String] = Array("")
scala> prop.isEmpty
val res1: Boolean = false
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.
Oh, sorry, I didn't see the [0]
part.
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.
But prop is not a list, it is a string because it takes the first element:
String prop = s.split(":")[0]; // Note the [0]
private String cleanPoint(String point) { | ||
point = point.replace(",\"z\":null", ""); | ||
point = point.replace(",\"heigth\":null", ""); | ||
point = point.replace("\"", ""); | ||
return point; | ||
} |
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.
🤮
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.
👍
Allow double quotes in node and rel properties with export csv.
Automatic is quote: always, so now using bulkImport everything is super quoted, but it matches how not using bulkImport works :)