'is Null' ('is not null') MQL translation

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Major - P3
    • 1.0.0
    • Affects Version/s: None
    • Component/s: Query
    • None
    • Needed
    • Hide

      Complexity: Simple (one-row flip + a short note on semantics)

      Feature Compatibility: mark the IS NULL comparison operator as supported. Note the semantics: is null matches explicitly-null and missing fields; is not null matches existing non-null fields (MongoDB null/missing equivalence, not SQL ternary logic). Cross-reference HIBERNATE-74.

      Show
      Complexity: Simple (one-row flip + a short note on semantics) Feature Compatibility: mark the IS NULL comparison operator as supported. Note the semantics: is null matches explicitly-null and missing fields; is not null matches existing non-null fields (MongoDB null/missing equivalence, not SQL ternary logic). Cross-reference HIBERNATE-74 .
    • None
    • None
    • None
    • None
    • None
    • None

      We need to translate `is null` and `is not null` into MQL counterparts. See the example below from Hibernate user guide relevant part (https://docs.jboss.org/hibernate/orm/6.6/userguide/html_single/Hibernate_User_Guide.html#hql-null-predicate):

      // select all persons with a nickname
      List<Person> persons = entityManager.createQuery(
      	"select p " +
      	"from Person p " +
      	"where p.nickName is not null",
      	Person.class)
      .getResultList();
      
      // select all persons without a nickname
      List<Person> persons = entityManager.createQuery(
      	"select p " +
      	"from Person p " +
      	"where p.nickName is null",
      	Person.class)
      .getResultList(); 

            Assignee:
            Almas Abdrazak
            Reporter:
            Nathan Xu (Inactive)
            Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: