pigspec 0.0.1 → 0.0.2
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/lib/pigspec/javabridge.rb +9 -0
- data/lib/pigspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3fb02b1553f14d7aabd0b1d2ca952ab42c849af
|
4
|
+
data.tar.gz: a856137bce4e3292c4435466a57870e34be8b2f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a84c9d6b724695026d76c2c90006650b37ea69240a6a381c27df26a2876e8a858a041dd0f02090a7a412ac58b8f1e47c5495c8907c6ced02f9e6c546310b16b
|
7
|
+
data.tar.gz: f6484d7efe2433ff1e064733cbd60c4ede92d558d4a6ac3c0fca4723d92e4f42b28b9efbed54a408d3c902041bebdd3a5077abe5ce04bc77865a514cf115252d
|
data/lib/pigspec/javabridge.rb
CHANGED
@@ -124,6 +124,7 @@ module PigSpec
|
|
124
124
|
when types.DOUBLE, types.FLOAT then value.toString.to_f
|
125
125
|
when types.BOOLEAN then value.toString.downcase.include? 't'
|
126
126
|
when types.TUPLE then read_tuple value
|
127
|
+
when types.BAG then read_bag value
|
127
128
|
# TODO: types.MAP is schemaless...How to cast it...?
|
128
129
|
when types.MAP then value.toString # read_map value
|
129
130
|
when types.UNKNOWN then nil
|
@@ -131,6 +132,14 @@ module PigSpec
|
|
131
132
|
end
|
132
133
|
end
|
133
134
|
|
135
|
+
def read_bag(bag)
|
136
|
+
casted = []
|
137
|
+
bag.each do |tuple|
|
138
|
+
casted.push read_tuple(tuple)
|
139
|
+
end
|
140
|
+
casted
|
141
|
+
end
|
142
|
+
|
134
143
|
def read_tuple(tuple)
|
135
144
|
casted = []
|
136
145
|
tuple.size.times do|index|
|
data/lib/pigspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pigspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shiracha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rjb
|