Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-15753

Support aggregation queries with embedded predicates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 15.0.0.Final
    • None

      It is not possible to parse an aggregation query if there is a predicate targeting an embedded indexed field.

      For instance given the model:

      /**
       * @Indexed(index="team")
       */
      message Team {
         /**
          * @Basic
          */
         required string name = 1;
         /**
          * @Embedded(includeDepth=2, structure=NESTED)
          */
         optional Player captain = 2;
         /**
          * @Embedded(includeDepth=2, structure=NESTED)
          */
         repeated Player players = 3;
      }
      
      message Player {
         /**
          * @Basic
          */
         required string nick = 1;
      }
      

      The following query does not work:

      select count(t) from Team t where t.name = 'fax' and t.captain.nick = 'mark' and t.players.nick is null group by t.name
      

      The error is:

      org.infinispan.objectfilter.ParsingException: ISPN028502: Unknown alias: captain.
      

              fercoli@redhat.com Fabio Massimo Ercoli
              fercoli@redhat.com Fabio Massimo Ercoli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: