contrueCT opened a new pull request, #3182:
URL: https://github.com/apache/hugegraph/pull/3182

   ## Purpose of the PR
   
   - close #3180
   - Fix HStore queries that combine flattened `within()` conditions with 
search or other
     post-filtered indexes and can drop valid vertices or edges.
   
   ### Root cause
   
   HStore does not sort these backend results by input IDs. HugeGraph therefore 
restores input
   order with `InputOrderIterator`, which may prefetch the next flattened 
subquery. That prefetch
   updates the shared origin query's `resultsFilter`. Previously, record 
matching happened after
   input-order restoration, so rows from subquery A could be checked with 
subquery B's filter.
   
   ![HStore query filter ordering before and after the 
fix](https://raw.githubusercontent.com/contrueCT/hugegraph/290d2e87ad2bd50ed7e3122d2d15ba36a1c9f19c/.github/images/issue-3180-query-filter-order.png)
   
   ## Main Changes
   
   - Apply index-result matching to each backend subquery before restoring 
input order.
   - Keep undefined-label diagnostics and hidden/deleting-label filtering at 
the public graph-query
     boundary.
   - Skip eager edge-cache population for queries that still require 
post-filtering, including
     search indexes, `INDEX_FILTER`, `SORT_KEYS`, and `INDEX` queries without 
an edge label.
   - Make the existing vertex regression deterministic by committing before 
querying, and add an
     equivalent edge regression plus cache-classification coverage.
   
   ## 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-server/hugegraph-test -am -P unit-test`
         - 682 tests, 0 failures, 0 errors, 1 skipped
       - Focused `core-test,hstore` regression set
         - 9 tests, 0 failures, 0 errors
       - Focused `core-test,memory` regression set
         - 2 tests, 0 failures, 0 errors
       - Focused `core-test,rocksdb` regression set
         - 2 tests, 0 failures, 0 errors
       - `mvn compile -Dmaven.javadoc.skip=true`
         - all 38 reactor modules compiled successfully
       - `mvn editorconfig:format`
         - no files required formatting
   
   ## 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
   - [x] Other affects: internal index-result filtering order and edge-cache 
eligibility
   - [ ] Nope
   
   ## Documentation Status
   
   - [ ] `Doc - TODO`
   - [ ] `Doc - Done`
   - [x] `Doc - No Need`
   


-- 
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