Retruns a hash based on the the current table code and kwargs.
        Also changes based on dependent tables.
494282
def get_hash(self):
        """"""
        depencency_hashes = [dep.get_hash() for dep in self.dep()]
        sl = inspect.getsourcelines
        hash_sources = [sl(self.__class__), self.args,
                        self.kwargs, *depencency_hashes]
        hash_input = pickle.dumps(hash_sources)
        return hashlib.md5(hash_input).hexdigest()
1245850
def rename(self, old_key, new_key):
        
        return lib.zhash_rename(self._as_parameter_, old_key, new_key)
74219
def transform_arguments(arguments, prev_values, inputs)
      arguments = arguments.replace_values_from_previous(prev_values)
      arguments.each do |arg_name, arg_values|
        arguments[arg_name] = {} unless arguments[arg_name].is_a?(Hash)
        arguments[arg_name]['value'] = ''
        if inputs.key?(arg_name)
          arguments[arg_name]['value'] = inputs[arg_name]
        elsif arg_values.is_a?(Hash) && arg_values.key?('default')
          arguments[arg_name]['value'] = arg_values['default']
        end
      end
    end
109000
def hash_to_model(klass_name, hash)
      model_klass =
        if self.class.const_defined?(klass_name, false)
          self.class.const_get(klass_name)
        else
          self.class.const_set(klass_name, Class.new(BaseModel))
        end
      model_klass.new(api, hash)
    end
30799
private void rehash()
                    throws IOException,
                    EOFException,
                    FileManagerException,
                    ClassNotFoundException,
                    HashtableOnDiskException {
        int size = (header.tablesize() * 2) + 1;
        if (this.tempTableSize > size) {
            doRehash(this.tempTableSize);
            this.tempTableSize = 0;
        } else {
            doRehash(size);
        }
    }
1075001
def override_attributes!(attrs={})
      @column_keys = attrs.keys
      @attrs = HashWithIndifferentAccess.new(Hash[attrs.map { |k, v| [ to_key(k), v ] }])
      @attrs.map { |k, v| define_accessor(k) }
    end
1046062
def invalidate(*tables, **kwargs):
    """"""
    backend = get_backend()
    db = kwargs.get('using', 'default')

    if backend._patched:
        for t in map(resolve_table, tables):
            backend.keyhandler.invalidate_table(t, db)
844678
def []=(key,val)
      change_type = keys.include?(key) ? :modified : :added
      changes = changes_for(change_type,:[]=,key,val)
      changing(change_type,:trigger=>:[]=, :changes=>changes) {super}
    end
358008
def hashes
      all_rows = rows.to_a
      header_row = all_rows.shift or raise Exception::Error, "no rows in table"

      headers = header_row.ths.map { |header_cell| header_cell.text  }
      result = []

      all_rows.each_with_index do |row, idx|
        cells = row.cells.to_a
        if cells.length != headers.length
          raise Exception::Error, "row at index #{idx} has #{cells.length} cells, expected #{headers.length}"
        end

        result << headers.inject({}) { |res, header| res.merge(header => cells.shift.text) }
      end

      result
    end
784005
def reload(options = nil)
      options = (options || {}).merge(no_obfuscated_id: true)

      clear_aggregation_cache
      clear_association_cache

      fresh_object =
        if options && options[:lock]
          self.class.unscoped { self.class.lock(options[:lock]).find(id, options) }
        else
          self.class.unscoped { self.class.find(id, options) }
        end

      @attributes = fresh_object.instance_variable_get('@attributes')
      @new_record = false
      self
    end
741343
def cast(hash, options = {})
      check_attributes_defined!
      check_hash_given!(hash)
      check_options!(options)
      set_default_options(options)

      attributes_caster = HCast::AttributesCaster.new(class_variable_get(:@@attributes), options)
      attributes_caster.cast(hash)
    end
924824
def select_sentence(hash)
      thrift_method = "getRowsByScanner"
      thrift_table = hash[:from]
      thrift_columns = hash[:select]
      thrift_filters = recurse_where(hash[:where] || [])
      thrift_limit = hash[:limit]
      
      HipsterSqlToHbase::ThriftCallGroup.new([{:method => thrift_method,:arguments => [thrift_table,thrift_columns,thrift_filters,thrift_limit,{}]}])
    end
604719
def hash(self, *args, **kwargs):
        
        joiner = kwargs.get('joiner', '').encode('utf-8')
        as_bytes = kwargs.get('as_bytes', False)

        def conv(arg):
            if isinstance(arg, integer_types):
                arg = int_to_bytes(arg)

            if PY3:
                if isinstance(arg, str):
                    arg = arg.encode('utf-8')
                return arg

            return str(arg)

        digest = joiner.join(map(conv, args))

        hash_obj = self._hash_func(digest)

        if as_bytes:
            return hash_obj.digest()

        return int_from_hex(hash_obj.hexdigest())
1107317
def transform_hash(original, options={}, &block)
      options[:safe_descent] ||= {}
      new_hash = {}
      options[:safe_descent][original.object_id] = new_hash
      original.inject(new_hash) { |result, (key,value)|
        if (options[:deep] && Hash === value)
          value = options[:safe_descent].fetch( value.object_id ) {
            transform_hash(value, options, &block)
          }
        end
        block.call(result,key,value)
        result
      }
    end
268619
def _add_hash(cls, attrs):
    
    cls.__hash__ = _make_hash(attrs, frozen=False, cache_hash=False)
    return cls
188248
def _table_relabel(table, substitutions, replacements=None):
    
    if replacements is not None:
        raise NotImplementedError

    observed = set()

    exprs = []
    for c in table.columns:
        expr = table[c]
        if c in substitutions:
            expr = expr.name(substitutions[c])
            observed.add(c)
        exprs.append(expr)

    for c in substitutions:
        if c not in observed:
            raise KeyError('{0!r} is not an existing column'.format(c))

    return table.projection(exprs)
1148111
def adapt_step_table!(parsed_step_table)
      # Saving off the original data
      parsed_step_table['cuke_modeler_parsing_data'] = Marshal::load(Marshal.dump(parsed_step_table))

      # Removing parsed data for child elements in order to avoid duplicating data
      parsed_step_table['cuke_modeler_parsing_data'][:rows] = nil

      parsed_step_table['rows'] = []
      parsed_step_table[:rows].each do |row|
        adapt_table_row!(row)
      end
      parsed_step_table['rows'].concat(parsed_step_table.delete(:rows))
      parsed_step_table['line'] = parsed_step_table.delete(:location)[:line]
    end