Пример #1
0
  boolean isUsedInPartitioning() {
    boolean ok = false;
    // TODO: Asif: Handle this case where region is turning out to be null
    // Ideally Bug 39923 workaround should ensure that region is not null. But we are doing
    // this check only for Update type statements. For Select queries, it may stll be null,
    // hence the check

    if (this.tqi == null) {
      return ok;
    }
    Region rgnOwningColumn = this.tqi.getRegion();
    assert rgnOwningColumn != null;
    RegionAttributes ra = rgnOwningColumn.getAttributes();
    // If the region is a Replicated Region or if it is a PR with just
    // itself
    // as a member then we should go with Derby's Activation Object
    DataPolicy policy = ra.getDataPolicy();

    if (policy.withPartitioning()) {
      PartitionedRegion pr = (PartitionedRegion) rgnOwningColumn;
      GfxdPartitionResolver rslvr = (GfxdPartitionResolver) pr.getPartitionResolver();
      ok = rslvr != null && rslvr.isUsedInPartitioning(this.actualColumnName);
    }
    return ok;
  }
Пример #2
0
 private void initResolverForColumnIfApplicable() {
   assert this.tqi != null;
   AbstractRegion rgn = this.tqi.getRegion();
   GfxdPartitionResolver rslvr = GemFireXDUtils.getResolver(rgn);
   if (rslvr != null && rslvr.isUsedInPartitioning(this.actualColumnName)) {
     this.resolver = rslvr;
     this.partitioningColPos = rslvr.getPartitioningColumnIndex(this.actualColumnName);
   }
 }