vaidikgarg-bit opened a new pull request, #3410:
URL: https://github.com/apache/hugegraph/pull/3410

   ## Purpose of the PR
   
   - follow-up to #3408 (issue #3407)
   
   The tests in #3408 call `ProjectionStage` directly, so they would still pass 
if `QueryUtil.buildPlan` stopped adding the projection for a `null_property` 
request or initialized it without `removeAllProperty`. This adds one case that 
runs `MapLimitIterator` output through the plan the server builds, checking 
that id-only rows come back with an empty value and that the limit dedup still 
drops repeated keys on that path.
   
   ## Main Changes
   
   - `ProjectionStageTest.testLimitDedupStillDropsCopiesThroughIdOnlyPlan`: 
builds the plan with `QueryUtil.buildPlan` for a request with `sample_factor = 
1.0` and `null_property = true`, asserts it is 
`QueryPlan{stages=[PROJECTION_STAGE]}`, feeds `MapLimitIterator` output through 
`plan.execute(...)` one row at a time, and checks that each of 100 keys comes 
out once with an empty value.
   
   `sample_factor` is set because its proto default, 0.0, builds a stop-only 
plan.
   
   No production code changes.
   
   ## Verifying these changes
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [ ] Already covered by existing tests, such as *(please modify tests 
here)*.
   - [x] Need tests and can be verified as follows:
       - `mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test 
-Dtest=ProjectionStageTest -Dsurefire.failIfNoSpecifiedTests=false`: 3 tests 
pass. With `ProjectionStage.java` reverted to its state before #3408, all three 
fail: the new test and `testLimitDedupStillDropsCopiesAfterProjection` with 
`key 0 emitted twice`, and `testRemoveAllPropertyLeavesInputColumnUnchanged` on 
its `assertSame`. If `buildPlan` stops adding the projection, only the new test 
fails.
       - `mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test`: 
183 tests, 0 failures.
       - `mvn editorconfig:check -pl hugegraph-store/hg-store-test -am` passes.
   
   ## Does this PR potentially affect the following parts?
   
   - [ ]  Dependencies ([add/update 
license](https://hugegraph.apache.org/docs/contribution-guidelines/contribute/#321-check-licenses)
 info & 
[regenerate_known_dependencies.sh](../install-dist/scripts/dependency/regenerate_known_dependencies.sh))
   - [ ]  Modify configurations
   - [ ]  The public API
   - [ ]  Other affects (typed here)
   - [x]  Nope
   
   ## Documentation Status
   
   - [ ] `Doc - TODO`: required documentation is pending; complete it before 
merging.
   - [ ] `Doc - Done`: documentation is included here or linked below.
   - [x] `Doc - No Need`: no user-visible documentation is affected.
   
   Documentation files in this PR or paired hugegraph-doc PR:
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to