trino-client 1.0.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +43 -0
- data/README.md +1 -1
- data/SECURITY.md +7 -0
- data/lib/trino/client/faraday_client.rb +12 -4
- data/lib/trino/client/query.rb +5 -3
- data/lib/trino/client/statement_client.rb +4 -2
- data/lib/trino/client/version.rb +1 -1
- data/lib/trino/client.rb +2 -4
- data/lib/trino-client.rb +1 -1
- data/trino-client.gemspec +16 -14
- metadata +76 -59
- data/.github/CODEOWNERS +0 -1
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -18
- data/.github/workflows/ruby.yml +0 -30
- data/.gitignore +0 -4
- data/Gemfile +0 -6
- data/Rakefile +0 -45
- data/modelgen/model_versions.rb +0 -280
- data/modelgen/modelgen.rb +0 -119
- data/modelgen/models.rb +0 -31
- data/modelgen/trino_models.rb +0 -270
- data/publish.rb +0 -14
- data/release.rb +0 -56
- data/spec/basic_query_spec.rb +0 -82
- data/spec/client_spec.rb +0 -75
- data/spec/gzip_spec.rb +0 -40
- data/spec/model_spec.rb +0 -35
- data/spec/spec_helper.rb +0 -42
- data/spec/statement_client_spec.rb +0 -637
- data/spec/tpch/q01.sql +0 -21
- data/spec/tpch/q02.sql +0 -43
- data/spec/tpch_query_spec.rb +0 -41
- data/trino-client-ruby/lib/trino-client-ruby.rb +0 -1
- data/trino-client-ruby/trino-client-ruby.gemspec +0 -20
data/spec/tpch_query_spec.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Trino::Client::Client do
|
4
|
-
before(:all) do
|
5
|
-
@spec_path = File.dirname(__FILE__)
|
6
|
-
WebMock.disable!
|
7
|
-
@cluster = TinyPresto::Cluster.new()
|
8
|
-
@container = @cluster.run
|
9
|
-
@client = Trino::Client.new(server: 'localhost:8080', catalog: 'tpch', user: 'test-user', schema: 'tiny')
|
10
|
-
loop do
|
11
|
-
begin
|
12
|
-
# Make sure to all workers are available.
|
13
|
-
@client.run('show schemas')
|
14
|
-
break
|
15
|
-
rescue StandardError => exception
|
16
|
-
puts "Waiting for cluster ready... #{exception}"
|
17
|
-
sleep(3)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
puts 'Cluster is ready'
|
21
|
-
end
|
22
|
-
|
23
|
-
after(:all) do
|
24
|
-
@cluster.stop
|
25
|
-
WebMock.enable!
|
26
|
-
end
|
27
|
-
|
28
|
-
it 'q01' do
|
29
|
-
q = File.read("#{@spec_path}/tpch/q01.sql")
|
30
|
-
columns, rows = run_with_retry(@client, q)
|
31
|
-
expect(columns.length).to be(10)
|
32
|
-
expect(rows.length).to be(4)
|
33
|
-
end
|
34
|
-
|
35
|
-
it 'q02' do
|
36
|
-
q = File.read("#{@spec_path}/tpch/q02.sql")
|
37
|
-
columns, rows = run_with_retry(@client, q)
|
38
|
-
expect(columns.length).to be(8)
|
39
|
-
expect(rows.length).to be(4)
|
40
|
-
end
|
41
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'trino-client'
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require File.expand_path '../lib/trino/client/version', File.dirname(__FILE__)
|
2
|
-
|
3
|
-
Gem::Specification.new do |gem|
|
4
|
-
gem.name = "trino-client-ruby"
|
5
|
-
gem.version = Trino::Client::VERSION
|
6
|
-
|
7
|
-
gem.authors = ["Sadayuki Furuhashi"]
|
8
|
-
gem.email = ["sf@treasure-data.com"]
|
9
|
-
gem.description = %q{Trino client library}
|
10
|
-
gem.summary = %q{Trino client library}
|
11
|
-
gem.homepage = "https://github.com/treasure-data/trino-client-ruby"
|
12
|
-
gem.license = "Apache-2.0"
|
13
|
-
|
14
|
-
gem.files = ['lib/trino-client-ruby.rb']
|
15
|
-
gem.require_paths = ["lib"]
|
16
|
-
|
17
|
-
gem.required_ruby_version = ">= 1.9.1"
|
18
|
-
|
19
|
-
gem.add_dependency "trino-client", Trino::Client::VERSION
|
20
|
-
end
|