I've been trying to develop a query that uses the sack, which seems to require turning off the bulking for accurate traversal merging. If I add the withBulk()
step the query returns the following when trying to profile:
{
"detailedMessage": "When specified, the profile()-Step must be the last step or followed only by the cap()-step.",
"requestId": "5078e1e8-0671-4a7a-94df-4fead2650e19",
"code": "InternalFailureException"
}
Update:
I'm not particularly familiar with the airports dataset, but I whipped out this query which seems to demonstrate my problem.
g.withBulk(false).withSack(1.0d,sum).V().has('code','SAF').out().in().barrier()
.project("airport","sack").by(__.identity().values("code")).by(__.sack()).order().by(__.select("sack"),desc)
The withBulk(false) with sack() usage is unfortunately very briefly touched upon in the documentation, so I can't exactly understand what is happening, but my guess is that traversal merging is not performed properly with bulking enabled.
If I run the query as is, I get the expected output:
If I remove it I get a lot of duplicates:
As for Neptune actually allowing this configuration, I have no clue, I just noticed the difference which seems to align with the very brief and confusing explanation given in the TinkerPop docs: "There is now a single traverser with bulk of 2 and sack of 1.0 and thus, setting withBulk(false) yields the expected 1.0"
You should be able to use the
sack()
step without doing anything with thewithBulk()
configuration (which Neptune does not expose the ability to change those configurations, anyways). If you can provide more details on the type of query you're trying to write, we maybe able to help you with some examples.Thank you for the response Taylor, I've just updated the question with more information on the issue