Bug 1238866 - Problem in dealing with the HQL queries that contain string comparison operations, when it involves empty string as an operand
Summary: Problem in dealing with the HQL queries that contain string comparison operat...
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.5.0,6.4.0,6.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: DR1
: 6.6.0
Assignee: Tristan Tarrant
QA Contact: Martin Gencur
URL:
Whiteboard:
Depends On:
Blocks: 1246688
TreeView+ depends on / blocked
 
Reported: 2015-07-02 20:33 UTC by Adrian Nistor
Modified: 2022-03-03 21:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1246688 (view as bug list)
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
Issue reproducer (2.89 KB, application/zip)
2015-08-07 08:02 UTC, Matej Čimbora
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ISPN-5561 0 Major Resolved Problem in dealing with the HQL queries that contain string comparison operations, when it involves empty string as an o... 2016-10-07 03:04:27 UTC

Description Adrian Nistor 2015-07-02 20:33:32 UTC

Comment 5 JBoss JIRA Server 2015-07-24 11:01:44 UTC
Adrian Nistor <anistor@redhat.com> updated the status of jira ISPN-5561 to Reopened

Comment 7 Matej Čimbora 2015-08-07 08:02:00 UTC
Created attachment 1060258 [details]
Issue reproducer

Comment 8 Matej Čimbora 2015-08-07 08:04:15 UTC
Looks like I'm still hitting the issue, attached reproducer.

1. unzip reproducer.zip
2. mvn clean install -s /path/to/settings.xml
3. mvn exec:java -s /path/to/settings.xml -Dexec.mainClass=QueryVfMain

Comment 9 Adrian Nistor 2015-08-07 13:32:51 UTC
Matej, what issue are you experiencing?
The reproducer seems to use the hibernate-search DSL to build a Lucene query object, but please note this BZ and the associated ISPN-5561 are actually referring to infinispan's DSL based queries, used in remote mode, embedded mode, compat mode. The description of ISPN-5561 is unfortunately terribly wordy and describes the HQL parser issue in terms of the Lucene query being built (wrongly, due to term analysis) behind the scene with some hibernate-search DSL invocation examples, but that's not what this bug is about. Or do we have a problem at the hibernate-search DSL level? I did not run the reproducer yet as there seems to be a compile error.

Comment 10 Matej Čimbora 2015-08-07 13:54:19 UTC
Hi Adrian, sorry for confusion. The issue I'm getting copies the one described in attached JIRA, i.e. 

org.hibernate.search.errors.EmptyQueryException: HSEARCH000146: The query string '' applied on field 'text' has no meaningfull tokens to be matched. Validate the query input against the Analyzer applied on this field.
	at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:111)
	at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:81)
	at QueryVfMain.main(QueryVfMain.java:32)

I've just run the reproducer without problems, maybe you're missing 6.4.0.DR1-redhat-1 artifacts in your maven repository?

In that case I'll make sure the issue doesn't occur when using ISPN DSL based queries. If that's the case, I'll move this issue to verified state. However the reproducer still deserves investigation, please let me know if you have any problems while making it work.

Comment 11 Matej Čimbora 2015-08-07 14:28:28 UTC
Looks like using ISPN Query DSL works fine.

Comment 12 Matej Čimbora 2015-08-10 07:29:34 UTC
Marking as verified as per https://bugzilla.redhat.com/show_bug.cgi?id=1238866#c9 & https://bugzilla.redhat.com/show_bug.cgi?id=1238866#c10. The issue was related to using ISPN DSL based queries.


Note You need to log in before you can comment on or make changes to this bug.