<commit_before>require 'dohmysql/readonly_row'

module DohDb

class TypedRowBuilder
  def initialize(row_klass = nil, guesser = nil)
    @row_klass = row_klass || ReadOnlyRow
  end

  def build_rows(result_set)
    return [] if result_set.size == 0

    retval = []
    result_set.each do |row|
      keys = []
      values = []
      row.each_pair do |key, value|
        keys.push(key)
        if value.is_a?(Time)
          values.push(value.to_datetime)
        else
          values.push(value)
        end
      end
      retval.push(@row_klass.new(keys, values))<commit_msg>remove unused argument<commit_after>require 'dohmysql/readonly_row'

module DohDb

class TypedRowBuilder
  def initialize(row_klass = nil)
    @row_klass = row_klass || ReadOnlyRow
  end

  def build_rows(result_set)
    return [] if result_set.size == 0

    retval = []
    result_set.each do |row|
      keys = []
      values = []
      row.each_pair do |key, value|
        keys.push(key)
        if value.is_a?(Time)
          values.push(value.to_datetime)
        else
          values.push(value)
        end
      end
      retval.push(@row_klass.new(keys, values))
{'fraction_non_alphanumeric': 0.10207612456747404, 'fraction_numerical': 0.0017301038062283738, 'mean_word_length': 2.3830409356725144, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4718482', 'n_tokens_mistral': 386, 'n_tokens_neox': 387, 'n_words': 81}