Skip to content

Commit

Permalink
Merge pull request #43 from nevermore3/fix_ic1
Browse files Browse the repository at this point in the history
fix ic1,ic12
  • Loading branch information
nevermore3 authored Aug 31, 2022
2 parents ebe98c9 + ed4b37f commit 20303be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nebula/queries-sf100/interactive-complex-12.ngql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MATCH (n:Person)-[:KNOWS]-(friend:Person)<-[:COMMENT_HAS_CREATOR]-(`comment`:`Comment`)-[:REPLY_OF_POST]->(:Post)-[:HAS_TAG]->(`tag`:`Tag`)-[:HAS_TYPE]->(tagClass:Tagclass)-[:IS_SUBCLASS_OF*0..100]->(baseTagClass:Tagclass)
WHERE id(n) == $personId AND (tagClass.Tagclass.name == $tagClassName OR baseTagClass.Tagclass.name == $tagClassName)
RETURN
id(friend) AS personId,
toInteger(substr(id(friend),2)) AS personId,
friend.Person.firstName AS personFirstName,
friend.Person.lastName AS personLastName,
collect(DISTINCT `tag`.`Tag`.name) AS tagNames,
Expand Down
2 changes: 1 addition & 1 deletion nebula/queries/interactive-complex-12.ngql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MATCH (n:Person)-[:KNOWS]-(friend:Person)<-[:COMMENT_HAS_CREATOR]-(`comment`:`Comment`)-[:REPLY_OF_POST]->(:Post)-[:HAS_TAG]->(`tag`:`Tag`)-[:HAS_TYPE]->(tagClass:Tagclass)-[:IS_SUBCLASS_OF*0..100]->(baseTagClass:Tagclass)
WHERE id(n) == $personId AND (tagClass.Tagclass.name == $tagClassName OR baseTagClass.Tagclass.name == $tagClassName)
RETURN
id(friend) AS personId,
toInteger(substr(id(friend),2)) AS personId,
friend.Person.firstName AS personFirstName,
friend.Person.lastName AS personLastName,
collect(DISTINCT `tag`.`Tag`.name) AS tagNames,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,23 @@ public LdbcQuery1Result convertSingleResult(ResultSet.Record record) throws Unsu

List<LdbcQuery1Result.Organization> universities = new ArrayList<>();
if (!record.get(11).isNull()) {
// TODO:
List<ValueWrapper> value = record.get(11).asList();
for (ValueWrapper list : value) {
List<ValueWrapper> res = list.asList();
universities.add(new LdbcQuery1Result.Organization(res.get(0).asString(), ((Long)res.get(1).asLong()).intValue(), res.get(2).asString()));
}
}

List<LdbcQuery1Result.Organization>companies = new ArrayList<>();
if (!record.get(12).isNull()) {
// TODO:
List<ValueWrapper> value = record.get(12).asList();
for (ValueWrapper list : value) {
List<ValueWrapper> res = list.asList();
companies.add(new LdbcQuery1Result.Organization(res.get(0).asString(), ((Long)res.get(1).asLong()).intValue(), res.get(2).asString()));
}
}

long friendId = Long.parseLong(record.get(0).asString().substring(NebulaID.ID_PREFIX_SIZE));
long friendId = record.get(0).asLong();
String friendLastName = record.get(1).asString();
int distanceFromPerson = (int) record.get(2).asLong();
long friendBirthday = NebulaConverter.convertDateToEpoch(record.get(3).asString());
Expand Down Expand Up @@ -372,7 +380,7 @@ public String getQueryString(NebulaDbConnectionState state, LdbcQuery12 operatio

@Override
public LdbcQuery12Result convertSingleResult(ResultSet.Record record) throws UnsupportedEncodingException {
long personId = Long.parseLong(record.get(0).asString().substring(NebulaID.ID_PREFIX_SIZE));
long personId = record.get(0).asLong();
String personFirstName = record.get(1).asString();
String personLastName = record.get(2).asString();
List<String> tagNames = new ArrayList<>();
Expand Down

0 comments on commit 20303be

Please sign in to comment.