Class: ArrowFormat::StreamingPullReader

Inherits:
Object
  • Object
show all
Includes:
Readable
Defined in:
lib/arrow-format/streaming-pull-reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&on_read) ⇒ StreamingPullReader

Returns a new instance of StreamingPullReader.



160
161
162
163
164
165
166
167
168
169
# File 'lib/arrow-format/streaming-pull-reader.rb', line 160

def initialize(&on_read)
  @on_read = on_read
  @message_pull_reader = MessagePullReader.new do |message, body|
    process_message(message, body)
  end
  @state = :schema
  @schema = nil
  @dictionaries = nil
  @dictionary_fields = nil
end

Instance Attribute Details

#schemaObject (readonly)

Returns the value of attribute schema.



159
160
161
# File 'lib/arrow-format/streaming-pull-reader.rb', line 159

def schema
  @schema
end

Instance Method Details

#consume(chunk) ⇒ Object



179
180
181
# File 'lib/arrow-format/streaming-pull-reader.rb', line 179

def consume(chunk)
  @message_pull_reader.consume(chunk)
end

#eos?Boolean

Returns:

  • (Boolean)


175
176
177
# File 'lib/arrow-format/streaming-pull-reader.rb', line 175

def eos?
  @message_pull_reader.eos?
end

#next_required_sizeObject



171
172
173
# File 'lib/arrow-format/streaming-pull-reader.rb', line 171

def next_required_size
  @message_pull_reader.next_required_size
end