sequel-impala 1.0.0 → 1.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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +16 -0
  3. data/LICENSE +2 -1
  4. data/README.md +45 -0
  5. data/lib/rbhive.rb +8 -0
  6. data/lib/rbhive/connection.rb +150 -0
  7. data/lib/rbhive/explain_result.rb +46 -0
  8. data/lib/rbhive/result_set.rb +37 -0
  9. data/lib/rbhive/schema_definition.rb +86 -0
  10. data/lib/rbhive/t_c_l_i_connection.rb +464 -0
  11. data/lib/rbhive/t_c_l_i_result_set.rb +3 -0
  12. data/lib/rbhive/t_c_l_i_schema_definition.rb +87 -0
  13. data/lib/rbhive/table_schema.rb +122 -0
  14. data/lib/rbhive/version.rb +3 -0
  15. data/lib/sequel/adapters/impala.rb +13 -1
  16. data/lib/sequel/adapters/rbhive.rb +174 -0
  17. data/lib/sequel/adapters/shared/impala.rb +11 -3
  18. data/lib/sequel/extensions/csv_to_parquet.rb +68 -14
  19. data/lib/thrift/facebook_service.rb +700 -0
  20. data/lib/thrift/fb303_constants.rb +9 -0
  21. data/lib/thrift/fb303_types.rb +19 -0
  22. data/lib/thrift/hive_metastore_constants.rb +41 -0
  23. data/lib/thrift/hive_metastore_types.rb +630 -0
  24. data/lib/thrift/hive_service_constants.rb +13 -0
  25. data/lib/thrift/hive_service_types.rb +72 -0
  26. data/lib/thrift/queryplan_constants.rb +13 -0
  27. data/lib/thrift/queryplan_types.rb +261 -0
  28. data/lib/thrift/sasl_client_transport.rb +161 -0
  29. data/lib/thrift/serde_constants.rb +92 -0
  30. data/lib/thrift/serde_types.rb +7 -0
  31. data/lib/thrift/t_c_l_i_service.rb +1054 -0
  32. data/lib/thrift/t_c_l_i_service_constants.rb +72 -0
  33. data/lib/thrift/t_c_l_i_service_types.rb +1768 -0
  34. data/lib/thrift/thrift_hive.rb +508 -0
  35. data/lib/thrift/thrift_hive_metastore.rb +3856 -0
  36. data/spec/impala_test.rb +6 -1
  37. metadata +53 -25
  38. data/README.rdoc +0 -39
@@ -190,9 +190,14 @@ describe "Impala parquet support" do
190
190
  @ds.to_parquet(:items2)
191
191
  @db[:items2].all.must_equal [{:number=>1}]
192
192
  end
193
- end
193
+ end unless DB.adapter_scheme == :rbhive
194
194
 
195
195
  describe "Impala create/drop schemas" do
196
+ before do
197
+ DB.drop_table?(:s1__items)
198
+ DB.drop_schema(:s1, :if_exists=>true)
199
+ end
200
+
196
201
  it "should use correct SQL" do
197
202
  DB.send(:create_schema_sql, :s1, {}).must_equal "CREATE SCHEMA `s1`"
198
203
  DB.send(:create_schema_sql, :s1, :if_not_exists=>true).must_equal "CREATE SCHEMA IF NOT EXISTS `s1`"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-impala
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - Jeremy Evans
7
+ - Ryan Duryea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-04 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thrift
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,70 +42,70 @@ dependencies:
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 5.7.0
61
+ version: '5.7'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 5.7.0
68
+ version: '5.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest-hooks
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest-shared_description
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: activesupport
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: |
@@ -113,17 +113,17 @@ description: |
113
113
  and jdbc/hive2 adapter for connecting to Impala. It includes
114
114
  modified versions of the impala and jdbc-hive2 gems that have
115
115
  been updated, tested, and optimized.
116
- email: code@jeremyevans.net
116
+ email: aguynamedryan@gmail.com
117
117
  executables: []
118
118
  extensions: []
119
119
  extra_rdoc_files:
120
- - README.rdoc
120
+ - README.md
121
121
  - CHANGELOG
122
122
  - LICENSE
123
123
  files:
124
124
  - CHANGELOG
125
125
  - LICENSE
126
- - README.rdoc
126
+ - README.md
127
127
  - Rakefile
128
128
  - lib/driver/commons-logging-1.2.jar
129
129
  - lib/driver/hadoop-common-2.6.0.jar
@@ -160,10 +160,38 @@ files:
160
160
  - lib/impala/protocol/thrift_hive_metastore.rb
161
161
  - lib/impala/version.rb
162
162
  - lib/jdbc/hive2.rb
163
+ - lib/rbhive.rb
164
+ - lib/rbhive/connection.rb
165
+ - lib/rbhive/explain_result.rb
166
+ - lib/rbhive/result_set.rb
167
+ - lib/rbhive/schema_definition.rb
168
+ - lib/rbhive/t_c_l_i_connection.rb
169
+ - lib/rbhive/t_c_l_i_result_set.rb
170
+ - lib/rbhive/t_c_l_i_schema_definition.rb
171
+ - lib/rbhive/table_schema.rb
172
+ - lib/rbhive/version.rb
163
173
  - lib/sequel/adapters/impala.rb
164
174
  - lib/sequel/adapters/jdbc/hive2.rb
175
+ - lib/sequel/adapters/rbhive.rb
165
176
  - lib/sequel/adapters/shared/impala.rb
166
177
  - lib/sequel/extensions/csv_to_parquet.rb
178
+ - lib/thrift/facebook_service.rb
179
+ - lib/thrift/fb303_constants.rb
180
+ - lib/thrift/fb303_types.rb
181
+ - lib/thrift/hive_metastore_constants.rb
182
+ - lib/thrift/hive_metastore_types.rb
183
+ - lib/thrift/hive_service_constants.rb
184
+ - lib/thrift/hive_service_types.rb
185
+ - lib/thrift/queryplan_constants.rb
186
+ - lib/thrift/queryplan_types.rb
187
+ - lib/thrift/sasl_client_transport.rb
188
+ - lib/thrift/serde_constants.rb
189
+ - lib/thrift/serde_types.rb
190
+ - lib/thrift/t_c_l_i_service.rb
191
+ - lib/thrift/t_c_l_i_service_constants.rb
192
+ - lib/thrift/t_c_l_i_service_types.rb
193
+ - lib/thrift/thrift_hive.rb
194
+ - lib/thrift/thrift_hive_metastore.rb
167
195
  - spec/database_test.rb
168
196
  - spec/dataset_test.rb
169
197
  - spec/files/bad_down_migration/001_create_alt_basic.rb
@@ -205,7 +233,7 @@ files:
205
233
  - spec/spec_helper.rb
206
234
  - spec/timezone_test.rb
207
235
  - spec/type_test.rb
208
- homepage: http://github.com/jeremyevans/sequel-impala
236
+ homepage: http://github.com/outcomesinsights/sequel-impala
209
237
  licenses:
210
238
  - MIT
211
239
  metadata: {}
@@ -217,7 +245,7 @@ rdoc_options:
217
245
  - "--title"
218
246
  - 'sequel-impala: Sequel support for Impala database'
219
247
  - "--main"
220
- - README.rdoc
248
+ - README.md
221
249
  require_paths:
222
250
  - lib
223
251
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -232,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
260
  version: '0'
233
261
  requirements: []
234
262
  rubyforge_project:
235
- rubygems_version: 2.4.5.1
263
+ rubygems_version: 2.4.8
236
264
  signing_key:
237
265
  specification_version: 4
238
266
  summary: Sequel support for Impala database
@@ -1,39 +0,0 @@
1
- = sequel-impala
2
-
3
- sequel-impala adds support for Sequel to connect to the Impala database
4
- via the included impala driver, and the included jdbc-hive2 driver under JRuby.
5
-
6
- = Source Code
7
-
8
- Source code is available on GitHub at https://github.com/jeremyevans/sequel-impala
9
-
10
- = Usage
11
-
12
- After installation, Sequel will automatically pick up the adapter as long as
13
- the lib directory is in RUBYLIB, if you use a connection string starting with
14
- +impala+, or <tt>jdbc:hive2</tt> on JRuby.
15
-
16
- = Connection Strings
17
-
18
- If using the impala driver (default host is localhost, default port is 21000):
19
-
20
- impala://host:port
21
-
22
- If using the jdbc:hive2 driver on JRuby (port 21050 works in testing):
23
-
24
- jdbc:hive2://host:port/;auth=noSasl
25
-
26
- = Dependencies
27
-
28
- * sequel 4+
29
- * thrift gem
30
-
31
- = License
32
-
33
- MIT/Apache
34
-
35
- = Author
36
-
37
- Jeremy Evans <code@jeremyevans.net>
38
-
39
- Work on sequel-impala is generously funded by Outcomes Insights, Inc.