<commit_before>ActiveSupport.on_load(:active_record) do
  module ActiveRecord
    module ConnectionAdapters
      class PostgreSQLAdapter < AbstractAdapter
        module OID
          # TODO:  Rather than use a serializer, here may be a better place to
          # do casting of geo data to RGeo types
          class Geometry < Type
            def type_cast(value)
              return if value.nil?
              value
              # ConnectionAdapters::PostgreSQLColumn.string_to_rgeo value
            end
          end
        
          class Geography < Type
            def type_cast(value)
              return if value.nil?
              value
              # ConnectionAdapters::PostgreSQLColumn.string_to_rgeo value
            end
          end
          
          class Point < Type
            def type_cast(value)
              return if value.nil?
              value
              # ConnectionAdapters::PostgreSQLColumn.string_to_rgeo value
            end
          end
          
          class Varbit < Type
            def type; :varbit; end
            
            def type_cast(value)
              return if value.nil?
              value.to_i(2)
            end
            
            def type_cast_for_write(value)
              return unless value.present?
              return value.to_s(2)
            end<commit_msg>Remove type_cast_on_write<commit_after>ActiveSupport.on_load(:active_record) do
  module ActiveRecord
    module ConnectionAdapters
      class PostgreSQLAdapter < AbstractAdapter
        module OID
          # TODO:  Rather than use a serializer, here may be a better place to
          # do casting of geo data to RGeo types
          class Geometry < Type
            def type_cast(value)
              return if value.nil?
              value
              # ConnectionAdapters::PostgreSQLColumn.string_to_rgeo value
            end
          end
        
          class Geography < Type
            def type_cast(value)
              return if value.nil?
              value
              # ConnectionAdapters::PostgreSQLColumn.string_to_rgeo value
            end
          end
          
          class Point < Type
            def type_cast(value)
              return if value.nil?
              value
              # ConnectionAdapters::PostgreSQLColumn.string_to_rgeo value
            end
          end
          
          class Varbit < Type
            def type; :varbit; end
            
            def type_cast(value)
              return if value.nil?
              value
            end
{'fraction_non_alphanumeric': 0.0405616224648986, 'fraction_numerical': 0.00078003120124805, 'mean_word_length': 1.2983870967741935, 'pattern_counts': {'":': 0, '<': 13, '<?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': '2355332', 'n_tokens_mistral': 626, 'n_tokens_neox': 613, 'n_words': 178}