-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records #12904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-15936 [Ruby] Add test for Arrow::DictionaryArray#raw_records #12904
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm. This dictionary isn't a dictionary.
For example, Arrow::NullArray.new(records.flatten) in build(Arrow::NullArray.new(records.flatten), records) isn't a dictionary.
How about something like the following?
def build_record_batch(array)
dictionary = array.dictionary_encode
schema = Arrow::Schema.new(column: dictionary.value_data_type)
Arrow::RecordBatch.new(schema, array.length, [dictionary])
endtarget = build(Arrow::NullArray.new(records.collect(&:first)))
kou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
|
thanks! Sorry for the late reaction... |
|
No problem! But please mention me when a pull request can be reviewed again. |
|
Benchmark runs are scheduled for baseline = dc39f83 and contender = 79810a5. 79810a5 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
I added test for Arrow::DictionaryArray#raw_records.