Skip to content

Commit

Permalink
[NOID] Use count methods with transaction state (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
zimmre authored Jan 10, 2024
1 parent 5e3459d commit 3ecf48f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/apoc/meta/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ public void rel(int typeId, String typeName, int labelId, String labelName, long
labelCount,
relTypeCount,
tokenRead.propertyKeyCount(),
read.countsForNodeWithoutTxState(ANY_LABEL),
read.countsForRelationshipWithoutTxState(ANY_LABEL, ANY_RELATIONSHIP_TYPE, ANY_LABEL),
read.countsForNode(ANY_LABEL),
read.countsForRelationship(ANY_LABEL, ANY_RELATIONSHIP_TYPE, ANY_LABEL),
labelStats,
relStats,
relStatsCount);
Expand Down Expand Up @@ -682,7 +682,7 @@ private static Map<String, Long> getLabelCountStore(Transaction tx, KernelTransa
Iterables.stream(tx.getAllLabelsInUse()).map(Label::name).collect(Collectors.toList());
TokenRead tokenRead = kernelTx.tokenRead();
return labels.stream().collect(Collectors.toMap(e -> e, e -> kernelTx.dataRead()
.countsForNodeWithoutTxState(tokenRead.nodeLabel(e))));
.countsForNode(tokenRead.nodeLabel(e))));
}

public static long getSampleForLabelCount(long labelCount, long sample) {
Expand Down

0 comments on commit 3ecf48f

Please sign in to comment.