impala 0.1.0 → 0.1.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.
@@ -73,11 +73,23 @@ module Impala
73
73
  end
74
74
 
75
75
  def convert_raw_value(value, schema)
76
+ return nil if value == 'NULL'
77
+
76
78
  case schema.type
77
79
  when 'string'
78
80
  value
81
+ when 'boolean'
82
+ if value == 'true'
83
+ true
84
+ elsif value == 'false'
85
+ false
86
+ else
87
+ raise "Invalid value for boolean: #{value}"
88
+ end
79
89
  when 'tinyint', 'int', 'bigint'
80
90
  value.to_i
91
+ when 'double'
92
+ value.to_f
81
93
  else
82
94
  raise "Unknown type: #{schema.type}" #TODO
83
95
  end
@@ -1,3 +1,3 @@
1
1
  module Impala
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: impala
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Colin Marc