<commit_before>module Pyper::DeletePipes
  # Deletes from a specified cassandra table.

  # @param table_name [Symbol] The table in which to store the attributes
  # @param client [Cassava::Client] client to query cassandra with
  class CassandraDeleter < Struct.new(:table_name, :client)
    # @param args [Hash] Should contain the primary keys to delete. Can contain a :columns key to remove specific values.
    # @param status [Hash] The mutable status field
    # @return [Hash] The original attributes
    # @return [Cassandra::Result] the Cass result
  def pipe(arguments, status = {})
      columns = arguments.delete(:columns)

      statement = columns.present? ? client.delete(table_name, columns) : client.delete(table_name)
      result = statement.where(arguments).execute
    end
  end
end<commit_msg>Tweaks.<commit_after>module Pyper::DeletePipes
  # Deletes from a specified cassandra table.

  # @param table_name [Symbol] The table from which to delete
  # @param client [Cassava::Client] client to query cassandra with
  class CassandraDeleter < Struct.new(:table_name, :client)
    # @param args [Hash] Should contain the primary keys to delete. Can contain a :columns key to remove specific values.
    # @param status [Hash] The mutable status field
    # @return [Hash] The original attributes
    # @return [Cassandra::Result] the Cass result
  def pipe(arguments, status = {})
      local_args = arguments.dup
      columns = local_args.delete(:columns)

      statement = columns.present? ? client.delete(table_name, columns) : client.delete(table_name)
      statement.where(local_args).execute
      arguments
    end
  end
end
{'fraction_non_alphanumeric': 0.0893719806763285, 'fraction_numerical': 0.0, 'mean_word_length': 4.006042296072508, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4658855', 'n_tokens_mistral': 463, 'n_tokens_neox': 452, 'n_words': 163}