| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| int leftLogicalIndex = range.getLeftStart(); | ||
| int rightLogicalIndex = range.getRightStart(); | ||
| while (leftIterator.nextRun() | rightIterator.nextRun()) { |
There was a problem hiding this comment.
| while (leftIterator.nextRun() | rightIterator.nextRun()) { | |
| while (leftIterator.nextRun() || rightIterator.nextRun()) { |
Sorry, something went wrong.
There was a problem hiding this comment.
I suppose we already checked the vector lengths to be equal, and since we're requiring run lengths to be equal, we don't need to check for any leftover runs after the loop?
Sorry, something went wrong.
There was a problem hiding this comment.
@lidavidm The vector length is checked in RangeEqualsVisitor.rangeEqual. If we call vector.visit(RangeEqualsVisitor, Range)` directly, the argument checks are skipped. Using rangeEqual is the best practice, but we seem to be unable to limit users from using another method. Therefore, I'm also considering whether we need to add more boundary checks in Iterator. What do you think?
Sorry, something went wrong.
There was a problem hiding this comment.
I think it doesn't hurt to make sure that both iterators are at the end at the end of the loop as a sanity check.
Sorry, something went wrong.
There was a problem hiding this comment.
@lidavidm According to your suggestion, I should change it to while (leftIterator.nextRun() && rightIterator.nextRun()) instead of while (leftIterator.nextRun() || rightIterator.nextRun()). The short-circuit feature of '||' will make only leftIterator move forward, while right stays still.
Sorry, something went wrong.
There was a problem hiding this comment.
Ah...that would be clearer over using the bitwise operator, yes
Sorry, something went wrong.
| int rightRunLength = Math.min(rightRunEnd, rightRangeEnd) - rightLogicalIndex; | ||
|
|
||
| if (leftRunLength != rightRunLength) { | ||
| if (leftIterator.getRunLength() != rightIterator.getRunLength()) { |
There was a problem hiding this comment.
While the original code had this problem too, maybe it's better to check the run length first? That's presumably a cheaper check and so we can bail out earlier.
Sorry, something went wrong.
There was a problem hiding this comment.
Modified as you suggested.
Sorry, something went wrong.
|
Ah, the linter is unhappy: 2025-05-21T23:24:02.6057815Z [WARN] /build/vector/src/main/java/org/apache/arrow/vector/complex/RunEndEncodedVector.java:833:5: Missing a Javadoc comment. [MissingJavadocMethod] 2025-05-21T23:24:02.6060058Z [WARN] /build/vector/src/main/java/org/apache/arrow/vector/complex/RunEndEncodedVector.java:850:5: Missing a Javadoc comment. [MissingJavadocMethod] 2025-05-21T23:24:02.6062203Z [WARN] /build/vector/src/main/java/org/apache/arrow/vector/complex/RunEndEncodedVector.java:864:5: Missing a Javadoc comment. [MissingJavadocMethod] |
Sorry, something went wrong.
|
@lidavidm There were 15 checks that failed. Which ones do I need to fix? Which check action does the linter belong to? |
Sorry, something went wrong.
|
All the checks run basically the same build, so you can check any one of them. The linter is part of running maven - did it not error locally? |
Sorry, something went wrong.
|
Same deal. I can push a fix if that's ok? Error: Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.4:check (spotless-check) on project arrow-vector: The following files had format violations:
Error: src/main/java/org/apache/arrow/vector/complex/RunEndEncodedVector.java
Error: @@ -836,7 +836,8 @@
Error: ·····*·@param·runEndEncodedVector·The·vector·to·iterate·over
Error: ·····*·@param·startIndex·The·logical·start·index·of·the·range·(inclusive)
Error: ·····*·@param·length·The·number·of·values·to·include·in·the·range
Error: -·····*·@throws·IllegalArgumentException·if·startIndex·is·negative·or·(startIndex·+·length)·exceeds·vector·bounds
Error: +·····*·@throws·IllegalArgumentException·if·startIndex·is·negative·or·(startIndex·+·length)·exceeds
Error: +·····*·····vector·bounds
Error: ·····*/
Error: ····public·RangeIterator(RunEndEncodedVector·runEndEncodedVector,·int·startIndex,·int·length)·{
Error: ······int·rangeEnd·=·startIndex·+·length;
Error: Run 'mvn spotless:apply' to fix these violations.
Error: -> [Help 1]
Error:
Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
Error: Re-run Maven using the -X switch to enable full debug logging.
Error:
Error: For more information about the errors and possible solutions, please read the following articles:
Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error:
Error: After correcting the problems, you can resume the build with the command
Error: mvn <args> -rf :arrow-vector
|
Sorry, something went wrong.
|
@lidavidm Thank you, I applied the spotless, but most of the checks failed, seems it's terminated for some reason. |
Sorry, something went wrong.
|
Retrying - I think GHA had an outage |
Sorry, something went wrong.
|
And I think those JNI failures are unrelated...I'll have to find time and take a look. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What's Changed
Avoid doing a binary search on every step to make the RangeEqualsVisitor of RunEndEncodedVector more efficient.
Closes #52 .