hexspace 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46cb7c0c6c1d1839a2672e99b5daedfd952e0f31ef9fdeabe055f980c8f52aca
4
- data.tar.gz: c16be8b8145beed444821a83b018f1d77a63db01947c1bdf6e34923bb64bc919
3
+ metadata.gz: 22ba7e18e6dec1e5c97403f0fc8ce08580309f750058137576c51208da225ee4
4
+ data.tar.gz: 3cc3bd22042aac858407961d5ef71eaa820f6c96381442b694f2cc8e9808f318
5
5
  SHA512:
6
- metadata.gz: 2badf30752d561592c909ec3eb15b3967b0b551479563a1972742a310e5c5da297e8beb58626e14177ab894efc16645b74337bc6f64c3fd1afb80ed861fffcac
7
- data.tar.gz: 92405d6ba47f7b3b5841250cc09638f4b44d487206a37f5dac1d8deb70ede1fb504a2635456a9e0c88a40b9e930840d6b0a8c76b4863bf658ea031ddd084dbca
6
+ metadata.gz: e158652968097ceb7590d26a6523a43525316991a60e122e02d911959938652864442ade94d751ba834eb43b09311ad7da243b7995e7e27be8e2b7277d85b887
7
+ data.tar.gz: 22b6218778f4b8b62575ab2da576da126671867033a0c35e8963147f84ac000b77910699b30923c10236e335217382543176f8fe1201db281d556ca47a7145f4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.2.0 (2023-05-07)
2
+
3
+ - Fixed error with Spark 3.4.0
4
+ - Dropped support for Ruby < 3
5
+
1
6
  ## 0.1.1 (2021-01-25)
2
7
 
3
8
  - Improved typecasting
data/README.md CHANGED
@@ -9,7 +9,7 @@ Ruby client for Apache Spark SQL and Apache Hive
9
9
  Add this line to your application’s Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'hexspace'
12
+ gem "hexspace"
13
13
  ```
14
14
 
15
15
  ## Getting Started
@@ -105,7 +105,8 @@ module Hexspace
105
105
  new_rows = 0
106
106
  start_offset = result.results.startRowOffset
107
107
 
108
- result.results.columns.each_with_index do |col, j|
108
+ # columns can be nil with Spark 3.4+
109
+ result.results.columns&.each_with_index do |col, j|
109
110
  name = columns[j]
110
111
  value = col.get_value
111
112
 
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.13.0)
2
+ # Autogenerated by Thrift Compiler (0.18.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -20,6 +20,11 @@ module Hexspace
20
20
  end
21
21
 
22
22
  def recv_OpenSession()
23
+ fname, mtype, rseqid = receive_message_begin()
24
+ handle_exception(mtype)
25
+ if reply_seqid(rseqid)==false
26
+ raise "seqid reply faild"
27
+ end
23
28
  result = receive_message(OpenSession_result)
24
29
  return result.success unless result.success.nil?
25
30
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'OpenSession failed: unknown result')
@@ -35,6 +40,11 @@ module Hexspace
35
40
  end
36
41
 
37
42
  def recv_CloseSession()
43
+ fname, mtype, rseqid = receive_message_begin()
44
+ handle_exception(mtype)
45
+ if reply_seqid(rseqid)==false
46
+ raise "seqid reply faild"
47
+ end
38
48
  result = receive_message(CloseSession_result)
39
49
  return result.success unless result.success.nil?
40
50
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CloseSession failed: unknown result')
@@ -50,6 +60,11 @@ module Hexspace
50
60
  end
51
61
 
52
62
  def recv_GetInfo()
63
+ fname, mtype, rseqid = receive_message_begin()
64
+ handle_exception(mtype)
65
+ if reply_seqid(rseqid)==false
66
+ raise "seqid reply faild"
67
+ end
53
68
  result = receive_message(GetInfo_result)
54
69
  return result.success unless result.success.nil?
55
70
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetInfo failed: unknown result')
@@ -65,6 +80,11 @@ module Hexspace
65
80
  end
66
81
 
67
82
  def recv_ExecuteStatement()
83
+ fname, mtype, rseqid = receive_message_begin()
84
+ handle_exception(mtype)
85
+ if reply_seqid(rseqid)==false
86
+ raise "seqid reply faild"
87
+ end
68
88
  result = receive_message(ExecuteStatement_result)
69
89
  return result.success unless result.success.nil?
70
90
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'ExecuteStatement failed: unknown result')
@@ -80,6 +100,11 @@ module Hexspace
80
100
  end
81
101
 
82
102
  def recv_GetTypeInfo()
103
+ fname, mtype, rseqid = receive_message_begin()
104
+ handle_exception(mtype)
105
+ if reply_seqid(rseqid)==false
106
+ raise "seqid reply faild"
107
+ end
83
108
  result = receive_message(GetTypeInfo_result)
84
109
  return result.success unless result.success.nil?
85
110
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetTypeInfo failed: unknown result')
@@ -95,6 +120,11 @@ module Hexspace
95
120
  end
96
121
 
97
122
  def recv_GetCatalogs()
123
+ fname, mtype, rseqid = receive_message_begin()
124
+ handle_exception(mtype)
125
+ if reply_seqid(rseqid)==false
126
+ raise "seqid reply faild"
127
+ end
98
128
  result = receive_message(GetCatalogs_result)
99
129
  return result.success unless result.success.nil?
100
130
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetCatalogs failed: unknown result')
@@ -110,6 +140,11 @@ module Hexspace
110
140
  end
111
141
 
112
142
  def recv_GetSchemas()
143
+ fname, mtype, rseqid = receive_message_begin()
144
+ handle_exception(mtype)
145
+ if reply_seqid(rseqid)==false
146
+ raise "seqid reply faild"
147
+ end
113
148
  result = receive_message(GetSchemas_result)
114
149
  return result.success unless result.success.nil?
115
150
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetSchemas failed: unknown result')
@@ -125,6 +160,11 @@ module Hexspace
125
160
  end
126
161
 
127
162
  def recv_GetTables()
163
+ fname, mtype, rseqid = receive_message_begin()
164
+ handle_exception(mtype)
165
+ if reply_seqid(rseqid)==false
166
+ raise "seqid reply faild"
167
+ end
128
168
  result = receive_message(GetTables_result)
129
169
  return result.success unless result.success.nil?
130
170
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetTables failed: unknown result')
@@ -140,6 +180,11 @@ module Hexspace
140
180
  end
141
181
 
142
182
  def recv_GetTableTypes()
183
+ fname, mtype, rseqid = receive_message_begin()
184
+ handle_exception(mtype)
185
+ if reply_seqid(rseqid)==false
186
+ raise "seqid reply faild"
187
+ end
143
188
  result = receive_message(GetTableTypes_result)
144
189
  return result.success unless result.success.nil?
145
190
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetTableTypes failed: unknown result')
@@ -155,6 +200,11 @@ module Hexspace
155
200
  end
156
201
 
157
202
  def recv_GetColumns()
203
+ fname, mtype, rseqid = receive_message_begin()
204
+ handle_exception(mtype)
205
+ if reply_seqid(rseqid)==false
206
+ raise "seqid reply faild"
207
+ end
158
208
  result = receive_message(GetColumns_result)
159
209
  return result.success unless result.success.nil?
160
210
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetColumns failed: unknown result')
@@ -170,6 +220,11 @@ module Hexspace
170
220
  end
171
221
 
172
222
  def recv_GetFunctions()
223
+ fname, mtype, rseqid = receive_message_begin()
224
+ handle_exception(mtype)
225
+ if reply_seqid(rseqid)==false
226
+ raise "seqid reply faild"
227
+ end
173
228
  result = receive_message(GetFunctions_result)
174
229
  return result.success unless result.success.nil?
175
230
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetFunctions failed: unknown result')
@@ -185,6 +240,11 @@ module Hexspace
185
240
  end
186
241
 
187
242
  def recv_GetPrimaryKeys()
243
+ fname, mtype, rseqid = receive_message_begin()
244
+ handle_exception(mtype)
245
+ if reply_seqid(rseqid)==false
246
+ raise "seqid reply faild"
247
+ end
188
248
  result = receive_message(GetPrimaryKeys_result)
189
249
  return result.success unless result.success.nil?
190
250
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetPrimaryKeys failed: unknown result')
@@ -200,6 +260,11 @@ module Hexspace
200
260
  end
201
261
 
202
262
  def recv_GetCrossReference()
263
+ fname, mtype, rseqid = receive_message_begin()
264
+ handle_exception(mtype)
265
+ if reply_seqid(rseqid)==false
266
+ raise "seqid reply faild"
267
+ end
203
268
  result = receive_message(GetCrossReference_result)
204
269
  return result.success unless result.success.nil?
205
270
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetCrossReference failed: unknown result')
@@ -215,6 +280,11 @@ module Hexspace
215
280
  end
216
281
 
217
282
  def recv_GetOperationStatus()
283
+ fname, mtype, rseqid = receive_message_begin()
284
+ handle_exception(mtype)
285
+ if reply_seqid(rseqid)==false
286
+ raise "seqid reply faild"
287
+ end
218
288
  result = receive_message(GetOperationStatus_result)
219
289
  return result.success unless result.success.nil?
220
290
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetOperationStatus failed: unknown result')
@@ -230,6 +300,11 @@ module Hexspace
230
300
  end
231
301
 
232
302
  def recv_CancelOperation()
303
+ fname, mtype, rseqid = receive_message_begin()
304
+ handle_exception(mtype)
305
+ if reply_seqid(rseqid)==false
306
+ raise "seqid reply faild"
307
+ end
233
308
  result = receive_message(CancelOperation_result)
234
309
  return result.success unless result.success.nil?
235
310
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CancelOperation failed: unknown result')
@@ -245,6 +320,11 @@ module Hexspace
245
320
  end
246
321
 
247
322
  def recv_CloseOperation()
323
+ fname, mtype, rseqid = receive_message_begin()
324
+ handle_exception(mtype)
325
+ if reply_seqid(rseqid)==false
326
+ raise "seqid reply faild"
327
+ end
248
328
  result = receive_message(CloseOperation_result)
249
329
  return result.success unless result.success.nil?
250
330
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CloseOperation failed: unknown result')
@@ -260,6 +340,11 @@ module Hexspace
260
340
  end
261
341
 
262
342
  def recv_GetResultSetMetadata()
343
+ fname, mtype, rseqid = receive_message_begin()
344
+ handle_exception(mtype)
345
+ if reply_seqid(rseqid)==false
346
+ raise "seqid reply faild"
347
+ end
263
348
  result = receive_message(GetResultSetMetadata_result)
264
349
  return result.success unless result.success.nil?
265
350
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetResultSetMetadata failed: unknown result')
@@ -275,6 +360,11 @@ module Hexspace
275
360
  end
276
361
 
277
362
  def recv_FetchResults()
363
+ fname, mtype, rseqid = receive_message_begin()
364
+ handle_exception(mtype)
365
+ if reply_seqid(rseqid)==false
366
+ raise "seqid reply faild"
367
+ end
278
368
  result = receive_message(FetchResults_result)
279
369
  return result.success unless result.success.nil?
280
370
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'FetchResults failed: unknown result')
@@ -290,6 +380,11 @@ module Hexspace
290
380
  end
291
381
 
292
382
  def recv_GetDelegationToken()
383
+ fname, mtype, rseqid = receive_message_begin()
384
+ handle_exception(mtype)
385
+ if reply_seqid(rseqid)==false
386
+ raise "seqid reply faild"
387
+ end
293
388
  result = receive_message(GetDelegationToken_result)
294
389
  return result.success unless result.success.nil?
295
390
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'GetDelegationToken failed: unknown result')
@@ -305,6 +400,11 @@ module Hexspace
305
400
  end
306
401
 
307
402
  def recv_CancelDelegationToken()
403
+ fname, mtype, rseqid = receive_message_begin()
404
+ handle_exception(mtype)
405
+ if reply_seqid(rseqid)==false
406
+ raise "seqid reply faild"
407
+ end
308
408
  result = receive_message(CancelDelegationToken_result)
309
409
  return result.success unless result.success.nil?
310
410
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'CancelDelegationToken failed: unknown result')
@@ -320,6 +420,11 @@ module Hexspace
320
420
  end
321
421
 
322
422
  def recv_RenewDelegationToken()
423
+ fname, mtype, rseqid = receive_message_begin()
424
+ handle_exception(mtype)
425
+ if reply_seqid(rseqid)==false
426
+ raise "seqid reply faild"
427
+ end
323
428
  result = receive_message(RenewDelegationToken_result)
324
429
  return result.success unless result.success.nil?
325
430
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'RenewDelegationToken failed: unknown result')
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.13.0)
2
+ # Autogenerated by Thrift Compiler (0.18.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,5 +1,5 @@
1
1
  #
2
- # Autogenerated by Thrift Compiler (0.13.0)
2
+ # Autogenerated by Thrift Compiler (0.18.1)
3
3
  #
4
4
  # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
5
  #
@@ -1,3 +1,3 @@
1
1
  module Hexspace
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/hexspace.rb CHANGED
@@ -6,14 +6,14 @@ require "bigdecimal"
6
6
  require "time"
7
7
 
8
8
  # thrift
9
- require "hexspace/tcli_service_constants"
10
- require "hexspace/tcli_service_types"
11
- require "hexspace/tcli_service"
9
+ require_relative "hexspace/tcli_service_constants"
10
+ require_relative "hexspace/tcli_service_types"
11
+ require_relative "hexspace/tcli_service"
12
12
 
13
13
  # modules
14
- require "hexspace/client"
15
- require "hexspace/sasl_transport"
16
- require "hexspace/version"
14
+ require_relative "hexspace/client"
15
+ require_relative "hexspace/sasl_transport"
16
+ require_relative "hexspace/version"
17
17
 
18
18
  module Hexspace
19
19
  class Error < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hexspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-25 00:00:00.000000000 Z
11
+ date: 2023-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thrift
@@ -16,16 +16,16 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.18'
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: '0.18'
27
27
  description:
28
- email: andrew@chartkick.com
28
+ email: andrew@ankane.org
29
29
  executables: []
30
30
  extensions: []
31
31
  extra_rdoc_files: []
@@ -52,14 +52,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '2.6'
55
+ version: '3'
56
56
  required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  requirements: []
62
- rubygems_version: 3.2.3
62
+ rubygems_version: 3.4.10
63
63
  signing_key:
64
64
  specification_version: 4
65
65
  summary: Ruby client for Apache Spark SQL and Apache Hive