Package org.apache.hadoop.hive.ql.exec.persistence

Examples of org.apache.hadoop.hive.ql.exec.persistence.MapJoinKey


   */
  @Override
  public void processOp(Object row, int tag) throws HiveException {
    alias = (byte)tag;
    // compute keys and values as StandardObjects
    MapJoinKey key = JoinUtil.computeMapJoinKeys(null, row, joinKeys[alias],
        joinKeysObjectInspectors[alias]);
    Object[] value = EMPTY_OBJECT_ARRAY;
    if((hasFilter(alias) && filterMaps[alias].length > 0) || joinValues[alias].size() > 0) {
      value = JoinUtil.computeMapJoinValues(row, joinValues[alias],
        joinValuesObjectInspectors[alias], joinFilters[alias], joinFilterObjectInspectors[alias],
View Full Code Here


   */
  @Override
  public void processOp(Object row, int tag) throws HiveException {
    byte alias = (byte)tag;
    // compute keys and values as StandardObjects. Use non-optimized key (MR).
    MapJoinKey key = MapJoinKey.readFromRow(null, new MapJoinKeyObject(),
        row, joinKeys[alias], joinKeysObjectInspectors[alias], true);
    Object[] value = EMPTY_OBJECT_ARRAY;
    if((hasFilter(alias) && filterMaps[alias].length > 0) || joinValues[alias].size() > 0) {
      value = JoinUtil.computeMapJoinValues(row, joinValues[alias],
        joinValuesObjectInspectors[alias], joinFilters[alias], joinFilterObjectInspectors[alias],
View Full Code Here

    }
  }

  protected transient final Output outputForMapJoinKey = new Output();
  protected MapJoinKey computeMapJoinKey(Object row, byte alias) throws HiveException {
    MapJoinKey refKey = getRefKey(key, alias);
    return MapJoinKey.readFromRow(outputForMapJoinKey,
        refKey, row, joinKeys[alias], joinKeysObjectInspectors[alias], key == refKey);
  }
View Full Code Here

    // We assume that since we are joining on the same key, all tables would have either
    // optimized or non-optimized key; hence, we can pass any key in any table as reference.
    // We do it so that MJKB could determine whether it can use optimized keys.
    for (byte pos = 0; pos < order.length; pos++) {
      if (pos == alias) continue;
      MapJoinKey refKey = mapJoinTables[pos].getAnyKey();
      if (refKey != null) return refKey;
    }
    return null; // All join tables have 0 keys, doesn't matter what we generate.
  }
View Full Code Here

        return this;
      }

      @Override
      public MapJoinKey evaluate(VectorHashKeyWrapper kw) throws HiveException {
        MapJoinKey refKey = getRefKey(key, alias);
        key = MapJoinKey.readFromVector(
            output, refKey, kw, keyOutputWriters, keyWrapperBatch, refKey == key);
        return key;
      }
    }.init();
View Full Code Here

    // We assume that since we are joining on the same key, all tables would have either
    // optimized or non-optimized key; hence, we can pass any key in any table as reference.
    // We do it so that MJKB could determine whether it can use optimized keys.
    for (byte pos = 0; pos < order.length; pos++) {
      if (pos == alias) continue;
      MapJoinKey refKey = mapJoinTables[pos].getAnyKey();
      if (refKey != null) return refKey;
    }
    return null; // All join tables have 0 keys, doesn't matter what we generate.
  }
View Full Code Here

      }

      alias = (byte) tag;
      if (hashMapRowGetters == null) {
        hashMapRowGetters = new ReusableGetAdaptor[mapJoinTables.length];
        MapJoinKey refKey = getRefKey(alias);
        for (byte pos = 0; pos < order.length; pos++) {
          if (pos != alias) {
            hashMapRowGetters[pos] = mapJoinTables[pos].createGetter(refKey);
          }
        }
View Full Code Here

    }
  }

  protected transient final Output outputForMapJoinKey = new Output();
  protected MapJoinKey computeMapJoinKey(Object row, byte alias) throws HiveException {
    MapJoinKey refKey = getRefKey(key, alias);
    return MapJoinKey.readFromRow(outputForMapJoinKey,
        refKey, row, joinKeys[alias], joinKeysObjectInspectors[alias], key == refKey);
  }
View Full Code Here

    // We assume that since we are joining on the same key, all tables would have either
    // optimized or non-optimized key; hence, we can pass any key in any table as reference.
    // We do it so that MJKB could determine whether it can use optimized keys.
    for (byte pos = 0; pos < order.length; pos++) {
      if (pos == alias) continue;
      MapJoinKey refKey = mapJoinTables[pos].getAnyKey();
      if (refKey != null) return refKey;
    }
    return null; // All join tables have 0 keys, doesn't matter what we generate.
  }
View Full Code Here

        return this;
      }

      @Override
      public MapJoinKey evaluate(VectorHashKeyWrapper kw) throws HiveException {
        MapJoinKey refKey = getRefKey(key, alias);
        key = MapJoinKey.readFromVector(
            output, refKey, kw, keyOutputWriters, keyWrapperBatch, refKey == key);
        return key;
      }
    }.init();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.exec.persistence.MapJoinKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.