You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by "spmallette (via GitHub)" <gi...@apache.org> on 2023/07/06 17:23:07 UTC
[GitHub] [tinkerpop] spmallette opened a new pull request, #2124: TINKERPOP-2965 Fixed bug in FilterRankingStrategy
spmallette opened a new pull request, #2124:
URL: https://github.com/apache/tinkerpop/pull/2124
https://issues.apache.org/jira/browse/TINKERPOP-2965
This problem showed up in 3.5.6/3.6.3 after TINKERPOP-2919 which improved performance. The changes failed to properly propogate labels up from child traversals into the TraversalParent cache it created. As a result, labels started shifting around when they shouldn't have.
VOTE +1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] lvca commented on pull request #2124: TINKERPOP-2965 Fixed bug in FilterRankingStrategy
Posted by "lvca (via GitHub)" <gi...@apache.org>.
lvca commented on PR #2124:
URL: https://github.com/apache/tinkerpop/pull/2124#issuecomment-1624181105
Thanks@ Is it going to be in the next 3.6.5 or 3.7?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] vkagamlyk commented on a diff in pull request #2124: TINKERPOP-2965 Fixed bug in FilterRankingStrategy
Posted by "vkagamlyk (via GitHub)" <gi...@apache.org>.
vkagamlyk commented on code in PR #2124:
URL: https://github.com/apache/tinkerpop/pull/2124#discussion_r1254893223
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DepthComparator.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.traversal.util;
+
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
+
+import java.util.Comparator;
+
+/**
+ * A {@code Comparator} that compares steps on the depth of the traversal that they are in.
+ */
+public final class DepthComparator implements Comparator<Step<?,?>> {
+
+ private static final DepthComparator instance = new DepthComparator();
+
+ private DepthComparator() {}
+
+ public static DepthComparator instance() {
+ return instance;
+ }
+
+ @Override
+ public int compare(final Step<?, ?> step1, final Step<?, ?> step2) {
+ return getDepth(step2) - getDepth(step1);
+ }
+
+ private int getDepth(final Step<?,?> step) {
Review Comment:
why is the variable `depth` needed here? can this code be simplified to
```
private int getDepth(final Step<?,?> step) {
return step == null || step instanceof EmptyStep ? 0 : getDepth((Step) step.getTraversal().getParent()) + 1;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] codecov-commenter commented on pull request #2124: TINKERPOP-2965 Fixed bug in FilterRankingStrategy
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2124:
URL: https://github.com/apache/tinkerpop/pull/2124#issuecomment-1624088759
## [Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/2124?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#2124](https://app.codecov.io/gh/apache/tinkerpop/pull/2124?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9fc2637) into [3.5-dev](https://app.codecov.io/gh/apache/tinkerpop/commit/1cca37e512ef0e186ab5ba1dfb1267c4288d4989?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (1cca37e) will **increase** coverage by `0.02%`.
> The diff coverage is `94.87%`.
```diff
@@ Coverage Diff @@
## 3.5-dev #2124 +/- ##
=============================================
+ Coverage 69.90% 69.92% +0.02%
- Complexity 8979 8997 +18
=============================================
Files 865 866 +1
Lines 40967 41001 +34
Branches 5450 5455 +5
=============================================
+ Hits 28636 28669 +33
+ Misses 10425 10423 -2
- Partials 1906 1909 +3
```
| [Impacted Files](https://app.codecov.io/gh/apache/tinkerpop/pull/2124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...remlin/process/traversal/util/DepthComparator.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC91dGlsL0RlcHRoQ29tcGFyYXRvci5qYXZh) | `80.00% <80.00%> (ø)` | |
| [...l/strategy/optimization/FilterRankingStrategy.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9zdHJhdGVneS9vcHRpbWl6YXRpb24vRmlsdGVyUmFua2luZ1N0cmF0ZWd5LmphdmE=) | `100.00% <100.00%> (ø)` | |
| [...remlin/process/traversal/util/TraversalHelper.java](https://app.codecov.io/gh/apache/tinkerpop/pull/2124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC91dGlsL1RyYXZlcnNhbEhlbHBlci5qYXZh) | `86.22% <100.00%> (+0.62%)` | :arrow_up: |
... and [3 files with indirect coverage changes](https://app.codecov.io/gh/apache/tinkerpop/pull/2124/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] vkagamlyk commented on pull request #2124: TINKERPOP-2965 Fixed bug in FilterRankingStrategy
Posted by "vkagamlyk (via GitHub)" <gi...@apache.org>.
vkagamlyk commented on PR #2124:
URL: https://github.com/apache/tinkerpop/pull/2124#issuecomment-1631010397
VOTE +1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] spmallette merged pull request #2124: TINKERPOP-2965 Fixed bug in FilterRankingStrategy
Posted by "spmallette (via GitHub)" <gi...@apache.org>.
spmallette merged PR #2124:
URL: https://github.com/apache/tinkerpop/pull/2124
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] spmallette commented on a diff in pull request #2124: TINKERPOP-2965 Fixed bug in FilterRankingStrategy
Posted by "spmallette (via GitHub)" <gi...@apache.org>.
spmallette commented on code in PR #2124:
URL: https://github.com/apache/tinkerpop/pull/2124#discussion_r1259489604
##########
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DepthComparator.java:
##########
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.process.traversal.util;
+
+import org.apache.tinkerpop.gremlin.process.traversal.Step;
+import org.apache.tinkerpop.gremlin.process.traversal.step.util.EmptyStep;
+
+import java.util.Comparator;
+
+/**
+ * A {@code Comparator} that compares steps on the depth of the traversal that they are in.
+ */
+public final class DepthComparator implements Comparator<Step<?,?>> {
+
+ private static final DepthComparator instance = new DepthComparator();
+
+ private DepthComparator() {}
+
+ public static DepthComparator instance() {
+ return instance;
+ }
+
+ @Override
+ public int compare(final Step<?, ?> step1, final Step<?, ?> step2) {
+ return getDepth(step2) - getDepth(step1);
+ }
+
+ private int getDepth(final Step<?,?> step) {
Review Comment:
oh, yeah, that could be simplified. i think i had something else happening there where `depth` made more sense. good catch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] spmallette commented on pull request #2124: TINKERPOP-2965 Fixed bug in FilterRankingStrategy
Posted by "spmallette (via GitHub)" <gi...@apache.org>.
spmallette commented on PR #2124:
URL: https://github.com/apache/tinkerpop/pull/2124#issuecomment-1624262406
all of them, 3.5.7, 3.6.5 and 3.7.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org