<commit_before>module Impala
  # Cursors are used to iterate over result sets without loading them all
  # into memory at once. This can be useful if you're dealing with lots of
  # rows. It implements Enumerable, so you can use each/select/map/etc.
  class Cursor
    BUFFER_SIZE = 1024
    include Enumerable

    def initialize(handle, service)
      @handle = handle
      @service = service


      @row_buffer = []
      @done = false
      @open = true
    end

    def inspect
      "#<#{self.class}#{open? ? '' : ' (CLOSED)'}>"
    end
<commit_msg>fetch data right off the bat, when a Cursor is instantiated.<commit_after>module Impala
  # Cursors are used to iterate over result sets without loading them all
  # into memory at once. This can be useful if you're dealing with lots of
  # rows. It implements Enumerable, so you can use each/select/map/etc.
  class Cursor
    BUFFER_SIZE = 1024
    include Enumerable

    def initialize(handle, service)
      @handle = handle
      @service = service


      @row_buffer = []
      @done = false
      @open = true

      fetch_more
    end

    def inspect
      "#<#{self.class}#{open? ? '' : ' (CLOSED)'}>"
    end

{'fraction_non_alphanumeric': 0.08821034775233248, 'fraction_numerical': 0.006785411365564037, 'mean_word_length': 2.597560975609756, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2444455', 'n_tokens_mistral': 367, 'n_tokens_neox': 346, 'n_words': 133}