Skip to content

Conversation

@kou
Copy link
Member

@kou kou commented Sep 25, 2018

No description provided.

@kou
Copy link
Member Author

kou commented Sep 25, 2018

@shiro615 Can you review this?

@wesm
Copy link
Member

wesm commented Sep 25, 2018

It occurred to me that we could make these methods OutputStream::Align or InputStream::Align instead of top level functions. Do you have an opinion?

@kou
Copy link
Member Author

kou commented Sep 25, 2018

InputStream::Align() and OutputStream::Align() are natural in object oriented API.
But the current AlignStream() in ipc/ isn't bad because this functionality is for IPC.

So both InputStream::Align() and AlignStream() in ipc/ are natural to me.

In Arrow GLib API, I prefer object oriented API because it's natural in Ruby. (Arrow GLib API is mapped to Arrow Ruby API automatically.)

def test_align
buffer = Arrow::Buffer.new("Hello World")
buffer_input_stream = Arrow::BufferInputStream.new(buffer)
buffer_input_stream.advance(8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps should we test with align () ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Good catch!
I've fixed this.

Copy link
Contributor

@shiro615 shiro615 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kou
Copy link
Member Author

kou commented Sep 26, 2018

Thanks! I'll merge this.

@kou kou closed this in 9d007b1 Sep 26, 2018
@kou kou deleted the glib-add-align-to-stream branch September 26, 2018 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants