dosubot[bot] commented on issue #2933:
URL: 
https://github.com/apache/incubator-hugegraph/issues/2933#issuecomment-3717699470

   <!-- Answer -->
   This is a known inconsistency in HugeGraph 1.7.0. The IllegalStateException 
about "Illegal key 'LABEL' with more than one value" is actually thrown by 
TinkerPop's Gremlin layer, not HugeGraph itself. It happens because HugeGraph's 
query planner pushes top-level label filters (like in your first query) into 
the backend, which triggers stricter validation and sometimes exceptions. In 
contrast, when you use `match` or nest the filters (like your second query), 
HugeGraph applies those filters in-memory after retrieving the data, so the 
exception doesn't occur and results are returned as expected. Other graph 
databases like JanusGraph and TinkerPop don't have this inconsistency—they 
return consistent results for both query forms.
   
   There is no recent fix or workaround documented for this specific 
regression. The best approach for now is to use the query form that works 
(e.g., using `match` or nested traversals) and avoid the problematic pattern 
with top-level multiple label filters after `inE()` or similar steps. This 
behavior is a result of HugeGraph's current query planner design and is not 
unique to your case—other users have reported similar inconsistencies between 
equivalent queries in HugeGraph 1.7.0.  
   [Reference](https://github.com/apache/incubator-hugegraph/issues/2929)
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/9c4f9946-cffc-4677-865d-33456afc8164?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/9c4f9946-cffc-4677-865d-33456afc8164?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/9c4f9946-cffc-4677-865d-33456afc8164?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/9c4f9946-cffc-4677-865d-33456afc8164?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/9c4f9946-cffc-4677-865d-33456afc8164?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/9c4f9946-cffc-4677-865d-33456afc8164?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/9c4f9946-cffc-4677-865d-33456afc8164?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/e5e246fa-a522-4d8a-ab3c-e2588b5b501b/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20inconsistency%20in%20HugeGraph%201.7.0.%20The%20IllegalStateException%20about%20%22Illegal%20key%20%27LABEL%27%20with%20more%20than%20one%20value%22%20is%20actually%20thrown%20by%20TinkerPop%27s%20Gremlin%20layer%2C%20not%20HugeGraph%20itself.%20It%20happens%20because%20HugeGraph%27s%20query%20planner%20pushes%20top-level%20label%20filters%20%28like%20in%20your%20first%20query%29%20into%20the%20backend%2C%20which%20triggers%20stricter%20validation%20and%20sometimes%20exceptions.%20In%20contrast%2C%20when%20you%20use%20%60match%60%20or%20nest%20the%20filters%20%28like%20your%20second%20query%29%2C%20HugeGraph%20applies%20those%20filters%20in-memory%20after%20retrieving%20the%20data%2C%20so%20the%20exception%20doesn%27t%20occu
 
r%20and%20results%20are%20returned%20as%20expected.%20Other%20graph%20databases%20like%20JanusGraph%20and%20TinkerPop%20don%27t%20have%20this%20inconsistency%E2%80%94they%20return%20consistent%20results%20for%20both%20query%20forms.%0A%0AThere%20is%20no%20recent%20fix%20or%20workaround%20documented%20for%20this%20specific%20regression.%20The%20best%20approach%20for%20now%20is%20to%20use%20the%20query%20form%20that%20works%20%28e.g.%2C%20using%20%60match%60%20or%20nested%20traversals%29%20and%20avoid%20the%20problematic%20pattern%20with%20top-level%20multiple%20label%20filters%20after%20%60inE%28%29%60%20or%20similar%20steps.%20This%20behavior%20is%20a%20result%20of%20HugeGraph%27s%20current%20query%20planner%20design%20and%20is%20not%20unique%20to%20your%20case%E2%80%94other%20users%20have%20reported%20similar%20inconsistencies%20between%20equivalent%20queries%20in%20HugeGraph%201.7.0.%20%20%0A%5BReference%5D%28https%3A//github.com/apache/incubator-hugegraph/issues/2929%29)&nbsp;[![
 Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-hugegraph/issues/2933)


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