<commit_before>module Protoable
  module Convert
    def self.included(klass)
      klass.extend Protoable::Convert::ClassMethods
    end

    module ClassMethods
      def convert_int64_to_time(int64)
        Time.at(int64.to_i)
      end

      def convert_int64_to_date(int64)
        convert_int64_to_time(int64).to_date
      end

      def convert_int64_to_datetime(int64)
        convert_int64_to_time(int64).to_datetime
      end

      def _protobuf_convert_columns_to_fields(key, value)
        value = case
                when _protobuf_column_converters.has_key?(key.to_sym) then
                  _protobuf_column_converters[key.to_sym].call(value)
                when _protobuf_datetime_column?(key) then
                  value.to_i
                when _protobuf_timestamp_column?(key) then
                  value.to_i
                when _protobuf_time_column?(key) then
                  value.to_i
                when _protobuf_date_column?(key) then
                  value.to_i
                else
                  value
                end<commit_msg>Put the date/time cases in alphabetical order...<commit_after>module Protoable
  module Convert
    def self.included(klass)
      klass.extend Protoable::Convert::ClassMethods
    end

    module ClassMethods
      def convert_int64_to_time(int64)
        Time.at(int64.to_i)
      end

      def convert_int64_to_date(int64)
        convert_int64_to_time(int64).to_date
      end

      def convert_int64_to_datetime(int64)
        convert_int64_to_time(int64).to_datetime
      end

      def _protobuf_convert_columns_to_fields(key, value)
        value = case
                when _protobuf_column_converters.has_key?(key.to_sym) then
                  _protobuf_column_converters[key.to_sym].call(value)
                when _protobuf_date_column?(key) then
                  value.to_i
                when _protobuf_datetime_column?(key) then
                  value.to_i
                when _protobuf_time_column?(key) then
                  value.to_i
                when _protobuf_timestamp_column?(key) then
                  value.to_i
                else
                  value
                end
{'fraction_non_alphanumeric': 0.05466970387243736, 'fraction_numerical': 0.020045558086560365, 'mean_word_length': 1.8262548262548262, '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': '5797580', 'n_tokens_mistral': 676, 'n_tokens_neox': 630, 'n_words': 107}