Skip to content

Simplify basic Ruby HTTP GET client example#22

Merged
kou merged 1 commit into
apache:mainfrom
ianmcook:ruby-client
Mar 16, 2024
Merged

Simplify basic Ruby HTTP GET client example#22
kou merged 1 commit into
apache:mainfrom
ianmcook:ruby-client

Conversation

@ianmcook

@ianmcook ianmcook commented Mar 15, 2024

Copy link
Copy Markdown
Member

Simplify the example as suggested by @kou in #19 (comment)

schema = reader.schema
table = reader.read_all
arrows_data = Net::HTTP.get(uri).freeze
table = Arrow::Table.load(Arrow::Buffer.new(arrows_data), format: :arrows)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You can get the schema from table.schema.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Right!

@ianmcook ianmcook requested a review from kou March 15, 2024 14:44

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Thanks!

schema = reader.schema
table = reader.read_all
arrows_data = Net::HTTP.get(uri).freeze
table = Arrow::Table.load(Arrow::Buffer.new(arrows_data), format: :arrows)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Right!

@kou kou merged commit 69a054a into apache:main Mar 16, 2024
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.

2 participants