Skip to content
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

BigQuery Ruby Client Library #query sql doesn't work on Ruby 3.0.0 #9128

Closed
joshdemoss opened this issue Feb 2, 2021 · 6 comments
Closed
Assignees
Labels
api: bigquery Issues related to the BigQuery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@joshdemoss
Copy link

joshdemoss commented Feb 2, 2021

Environment details

  • OS: macOS Catalina, 10.15.7
  • Ruby version: 3.0.0
  • Gem name and version: google-cloud-bigquery 1.26.0

Steps to reproduce

  1. Use google-cloud-bigquery with ruby version 3.0.0, with rvm and bundler
  2. Query using the following code

Code example

# Authentication set up and works
bigquery = Google::Cloud::Bigquery.new
# The table exists -- I can use other methods like #datasets and #tables to verify that it is connected to the right table
sql = "SELECT * FROM `EXISTING_TABLE_IN_BIGQUERY` LIMIT 1000"
results = bigquery.query sql

Full backtrace

/Users/****/.rvm/gems/ruby-3.0.0/gems/google-cloud-bigquery-1.26.0/lib/google/cloud/bigquery/service.rb:222:in `list_tabledata': wrong number of arguments (given 3, expected 2) (ArgumentError)
        from /Users/****/.rvm/gems/ruby-3.0.0/gems/google-cloud-bigquery-1.26.0/lib/google/cloud/bigquery/query_job.rb:696:in `data'
        from /Users/****/.rvm/gems/ruby-3.0.0/gems/google-cloud-bigquery-1.26.0/lib/google/cloud/bigquery/project.rb:881:in `query'
        from app.rb:12:in `query'
        from app.rb:32:in `<main>'

Easiest solution

  • rvm use 2.7.2
  • bundle
  • #run code
@quartzmo quartzmo self-assigned this Feb 2, 2021
@quartzmo quartzmo added the api: bigquery Issues related to the BigQuery API. label Feb 2, 2021
@quartzmo
Copy link
Member

quartzmo commented Feb 2, 2021

@joshdemoss Thanks for this request! Ruby 3 support is on the way, and will address the specific issue you demonstrate here. I'll try to get more detail on the status and report back here.

@quartzmo quartzmo added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Feb 2, 2021
@quartzmo
Copy link
Member

quartzmo commented Feb 2, 2021

Similar to #8580.

@quartzmo
Copy link
Member

quartzmo commented Feb 2, 2021

The google-cloud-ruby gems have a couple of important dependencies that must first be updated to support Ruby 3:

Both of these PRs have now been merged, but we're waiting for the next scheduled google-protobuf release, which should be in the next few weeks.

@avondalepark
Copy link

@quartzmo Great news about support for 3, in the meantime what is the most recent supported version of Ruby?

@quartzmo
Copy link
Member

These are the Ruby versions that we are currently testing in CI. Hopefully there will soon be some changes to the contents of this directory!

@dazuma
Copy link
Member

dazuma commented Mar 9, 2021

Fixed in the master branch. Will release updated gems shortly.

@dazuma dazuma closed this as completed Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants