Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-7793

SQL does not work if value has sql field which name equals to affinity key name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.8
    • sql
    • None

    Description

      SQL does not work if value has index filed which name equals to affinity key name:

      public class AKey {
          @AffinityKeyMapped
          int a;
          public AKey(int a) {
              this.a = a;
          }
      }
      
      public class AVal {
          @QuerySqlField
          int a;
          public AVal(int a) {
              this.a = a;
          }
      }
      
      AKey aKey = new AKey(1);
      AVal aVal = new AVal(0);
      
      IgniteCache<Object, Object> cache = ignite.cache("Instrument");
      cache.put(aKey, aVal);
      
      SqlFieldsQuery query = new SqlFieldsQuery("select * from \"Instrument\".AVal it where it.a=?");
      
      List<List<?>> res = cache.query(query.setArgs(0)).getAll();
      
      if(res.isEmpty()) {
          System.out.println("!!!!!!!!! FAILED !!!!!!!!!!!");
      }
      
      
      

      Attachments

        Issue Links

          Activity

            People

              Maxim.Pudov Maxim Pudov
              mcherkasov Mikhail Cherkasov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: