piglet 0.2.5 → 0.3.0
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.
- data/.gitignore +5 -4
- data/Gemfile +10 -0
- data/Gemfile.lock +53 -0
- data/README.rdoc +74 -38
- data/Rakefile +10 -1
- data/lib/piglet.rb +5 -1
- data/lib/piglet/field/call_expression.rb +7 -2
- data/lib/piglet/field/direct_expression.rb +28 -0
- data/lib/piglet/field/field.rb +73 -3
- data/lib/piglet/field/infix_expression.rb +14 -9
- data/lib/piglet/field/map_value.rb +17 -0
- data/lib/piglet/field/prefix_expression.rb +6 -3
- data/lib/piglet/field/reference.rb +5 -7
- data/lib/piglet/field/rename.rb +7 -5
- data/lib/piglet/field/suffix_expression.rb +4 -2
- data/lib/piglet/field/udf_expression.rb +19 -2
- data/lib/piglet/inout/load.rb +2 -2
- data/lib/piglet/interpreter.rb +8 -18
- data/lib/piglet/relation/block_context.rb +41 -0
- data/lib/piglet/relation/cogroup.rb +2 -1
- data/lib/piglet/relation/cross.rb +2 -2
- data/lib/piglet/relation/distinct.rb +2 -2
- data/lib/piglet/relation/filter.rb +2 -2
- data/lib/piglet/relation/foreach.rb +2 -2
- data/lib/piglet/relation/group.rb +2 -2
- data/lib/piglet/relation/join.rb +2 -1
- data/lib/piglet/relation/limit.rb +2 -2
- data/lib/piglet/relation/nested_foreach.rb +60 -0
- data/lib/piglet/relation/order.rb +4 -2
- data/lib/piglet/relation/relation.rb +43 -32
- data/lib/piglet/relation/sample.rb +2 -2
- data/lib/piglet/relation/split.rb +5 -5
- data/lib/piglet/relation/stream.rb +2 -1
- data/lib/piglet/relation/union.rb +2 -2
- data/piglet.gemspec +126 -0
- data/spec/piglet/field/field_spec.rb +7 -2
- data/spec/piglet/interpreter_spec.rb +6 -6
- data/spec/piglet/relation/relation_spec.rb +7 -4
- data/spec/piglet/relation/split_spec.rb +3 -1
- data/spec/piglet/relation/union_spec.rb +5 -7
- data/spec/piglet_spec.rb +76 -31
- data/spec/spec_helper.rb +9 -0
- data/tasks/gem.rake +16 -19
- data/tasks/rdoc.rake +1 -3
- metadata +34 -11
- data/TODO +0 -2
@@ -6,8 +6,10 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
|
6
6
|
describe Piglet::Relation::Relation do
|
7
7
|
|
8
8
|
before do
|
9
|
-
@
|
10
|
-
@
|
9
|
+
@interpreter = double()
|
10
|
+
@interpreter.stub(:next_relation_alias).and_return(rand(10000))
|
11
|
+
@relation = PlainRelation.new(@interpreter)
|
12
|
+
@relation.extend(Piglet::Relation::Relation)
|
11
13
|
end
|
12
14
|
|
13
15
|
it 'has a alias' do
|
@@ -16,9 +18,10 @@ describe Piglet::Relation::Relation do
|
|
16
18
|
|
17
19
|
it 'has a unique alias' do
|
18
20
|
aliases = { }
|
21
|
+
interpreter = double()
|
22
|
+
interpreter.stub(:next_relation_alias).and_return(*(0..1000).to_a)
|
19
23
|
1000.times do
|
20
|
-
@relation =
|
21
|
-
@relation.extend Piglet::Relation::Relation
|
24
|
+
@relation = PlainRelation.new(interpreter)
|
22
25
|
aliases.should_not have_key(@relation.alias)
|
23
26
|
aliases[@relation.alias] = @relation
|
24
27
|
end
|
@@ -12,7 +12,9 @@ describe Piglet::Relation::Split do
|
|
12
12
|
@relation.stub!(:alias).and_return('rel')
|
13
13
|
@expr1.stub!(:to_s).and_return('expr1')
|
14
14
|
@expr2.stub!(:to_s).and_return('expr2')
|
15
|
-
@
|
15
|
+
@interpreter = mock('Interpreter')
|
16
|
+
@interpreter.stub(:next_relation_alias).and_return(3)
|
17
|
+
@split = Piglet::Relation::Split.new(@relation, @interpreter, [@expr1, @expr2])
|
16
18
|
end
|
17
19
|
|
18
20
|
describe '#to_s' do
|
@@ -6,13 +6,11 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
|
|
6
6
|
describe Piglet::Relation::Union do
|
7
7
|
|
8
8
|
before do
|
9
|
-
@
|
10
|
-
@relation1
|
11
|
-
@
|
12
|
-
@
|
13
|
-
@
|
14
|
-
@relation2.stub!(:alias).and_return('relation2')
|
15
|
-
@relation3.stub!(:alias).and_return('relation3')
|
9
|
+
@interpreter = stub()
|
10
|
+
@interpreter.stub(:next_relation_alias).and_return('relation1', 'relation2', 'relation3')
|
11
|
+
@relation1 = PlainRelation.new(@interpreter)
|
12
|
+
@relation2 = PlainRelation.new(@interpreter)
|
13
|
+
@relation3 = PlainRelation.new(@interpreter)
|
16
14
|
end
|
17
15
|
|
18
16
|
describe '#to_s' do
|
data/spec/piglet_spec.rb
CHANGED
@@ -243,49 +243,94 @@ describe Piglet do
|
|
243
243
|
|
244
244
|
describe 'FOREACH … GENERATE' do
|
245
245
|
it 'outputs a FOREACH … GENERATE statement' do
|
246
|
-
@interpreter.interpret { dump(load('in').foreach {
|
246
|
+
@interpreter.interpret { dump(load('in').foreach { :a }) }
|
247
247
|
@interpreter.to_pig_latin.should match(/FOREACH \w+ GENERATE a/)
|
248
248
|
end
|
249
249
|
|
250
250
|
it 'outputs a FOREACH … GENERATE statement with a list of fields' do
|
251
|
-
@interpreter.interpret { dump(load('in').foreach {
|
251
|
+
@interpreter.interpret { dump(load('in').foreach { [:a, :b, :c] }) }
|
252
252
|
@interpreter.to_pig_latin.should match(/FOREACH \w+ GENERATE a, b, c/)
|
253
253
|
end
|
254
254
|
|
255
255
|
it 'outputs a FOREACH … GENERATE statement with fields resolved from the relation' do
|
256
|
-
@interpreter.interpret { dump(load('in').foreach {
|
256
|
+
@interpreter.interpret { dump(load('in').foreach { [a, b, c] }) }
|
257
257
|
@interpreter.to_pig_latin.should match(/FOREACH (\w+) GENERATE a, b, c/)
|
258
258
|
end
|
259
259
|
|
260
260
|
it 'outputs a FOREACH … GENERATE statement with fields resolved from the relation with positional syntax' do
|
261
|
-
@interpreter.interpret { dump(load('in').foreach {
|
261
|
+
@interpreter.interpret { dump(load('in').foreach { [self[0], self[1], self[2]] }) }
|
262
262
|
@interpreter.to_pig_latin.should match(/FOREACH (\w+) GENERATE \$0, \$1, \$2/)
|
263
263
|
end
|
264
264
|
|
265
265
|
it 'outputs a FOREACH … GENERATE statement with aggregate functions applied to the fields' do
|
266
|
-
@interpreter.interpret { dump(load('in').foreach {
|
266
|
+
@interpreter.interpret { dump(load('in').foreach { [a.max, b.min, c.avg] }) }
|
267
267
|
@interpreter.to_pig_latin.should match(/FOREACH (\w+) GENERATE MAX\(a\), MIN\(b\), AVG\(c\)/)
|
268
268
|
end
|
269
269
|
|
270
270
|
it 'outputs a FOREACH … GENERATE statement with fields that access inner fields' do
|
271
|
-
@interpreter.interpret { dump(load('in').foreach {
|
271
|
+
@interpreter.interpret { dump(load('in').foreach { [a.b, b.c, c.d] }) }
|
272
272
|
@interpreter.to_pig_latin.should match(/FOREACH (\w+) GENERATE a.b, b.c, c.d/)
|
273
273
|
end
|
274
274
|
|
275
275
|
it 'outputs a FOREACH … GENERATE statement that includes field aliasing' do
|
276
|
-
@interpreter.interpret { dump(load('in').foreach {
|
276
|
+
@interpreter.interpret { dump(load('in').foreach { [a.b.as(:c), a.b.as(:d)] }) }
|
277
277
|
@interpreter.to_pig_latin.should match(/FOREACH (\w+) GENERATE a.b AS c, a.b AS d/)
|
278
278
|
end
|
279
279
|
end
|
280
|
+
|
281
|
+
describe 'FOREACH ... { ... GENERATE }' do
|
282
|
+
it 'outputs a FOREACH ... { ... GENERATE } statement for named fields' do
|
283
|
+
@interpreter.interpret { dump(load('in').nested_foreach { [a, b, c] }) }
|
284
|
+
@interpreter.to_pig_latin.should match(/FOREACH \w+ \{\s+(\w+) = a;\s+(\w+) = b;\s+(\w+) = c;\s+GENERATE \1, \2, \3;\s+\}/m)
|
285
|
+
end
|
286
|
+
|
287
|
+
it 'outputs a FOREACH ... { ... GENERATE } statement for positional fields' do
|
288
|
+
@interpreter.interpret { dump(load('in').nested_foreach { [self[0], self[1], self[2]] }) }
|
289
|
+
@interpreter.to_pig_latin.should match(/FOREACH \w+ \{\s+(\w+) = \$0\;\s+(\w+) = \$1\;\s+(\w+) = \$2\;\s+GENERATE \1, \2, \3\;\s+\}/m)
|
290
|
+
end
|
291
|
+
|
292
|
+
it 'outputs a FOREACH ... { ... GENERATE } statement with aggregate functions applied to fields' do
|
293
|
+
@interpreter.interpret { dump(load('in').nested_foreach { [a.max, b.min, c.avg] }) }
|
294
|
+
@interpreter.to_pig_latin.should match(/FOREACH \w+ \{\s+(\w+) = a;\s+(\w+) = MAX\(\1\);\s+(\w+) = b;\s+(\w+) = MIN\(\3\);\s+(\w+) = c;\s+(\w+) = AVG\(\5\);\s+GENERATE \2, \4, \6;\s+\}/m)
|
295
|
+
end
|
296
|
+
|
297
|
+
it 'outputs a FOREACH ... { ... GENERATE } statement with fields that access inner fields' do
|
298
|
+
@interpreter.interpret { dump(load('in').nested_foreach { [a.b, b.c]}) }
|
299
|
+
@interpreter.to_pig_latin.should match(/FOREACH \w+ \{\s+(\w+) = a;\s+(\w+) = \1.b;\s+(\w+) = b;\s+(\w+) = \3.c;\s+GENERATE \2, \4;\s+\}/m)
|
300
|
+
end
|
301
|
+
|
302
|
+
it 'outputs a FOREACH ... { ... GENERATE } statement with user defined functions' do
|
303
|
+
@interpreter.interpret do
|
304
|
+
define('my_udf', :function => 'com.example.My')
|
305
|
+
dump(load('in').nested_foreach { [my_udf(a, 3, "hello")] })
|
306
|
+
end
|
307
|
+
@interpreter.to_pig_latin.should match(/FOREACH \w+ \{\s+(\w+) = a;\s+(\w+) = my_udf\(\1, 3, 'hello'\);\s+GENERATE \2;\s+\}/)
|
308
|
+
end
|
309
|
+
|
310
|
+
it 'outputs a FOREACH ... { ... GENERATE } statement with bag methods' do
|
311
|
+
@interpreter.interpret { dump(load('in').nested_foreach { [self[1].distinct.sample(0.3).limit(5).order(:x).filter { x == 5 }] }) }
|
312
|
+
@interpreter.to_pig_latin.should match(/FOREACH \w+ \{\s+(\w+) = \$1;\s+(\w+) = DISTINCT \1;\s+(\w+) = SAMPLE \2 0.3;\s+(\w+) = LIMIT \3 5;\s+(\w+) = ORDER \4 BY x;\s+(\w+) = FILTER \5 BY x == 5;\s+GENERATE \6;\s+\}/m)
|
313
|
+
end
|
314
|
+
|
315
|
+
it 'outputs a FOREACH ... { ... GENERATE } statement with field aliasing' do
|
316
|
+
@interpreter.interpret { dump(load('in').nested_foreach { a = b.distinct; [a.as(:c)] }) }
|
317
|
+
@interpreter.to_pig_latin.should match(/FOREACH \w+ \{\s+(\w+) = b;\s+(\w+) = DISTINCT \1;\s+GENERATE \2 AS c;\s+\}/)
|
318
|
+
end
|
319
|
+
|
320
|
+
it 'outputs a FOREACH ... { ... GENERATE } statement with flatten' do
|
321
|
+
@interpreter.interpret { dump(load('in').nested_foreach { [a.flatten] }) }
|
322
|
+
@interpreter.to_pig_latin.should match(/FOREACH \w+ \{\s+(\w+) = a;\s+(\w+) = FLATTEN\(\1\);\s+GENERATE \2;\s+\}/m)
|
323
|
+
end
|
324
|
+
end
|
280
325
|
|
281
326
|
describe 'FILTER' do
|
282
327
|
it 'outputs a FILTER statement' do
|
283
|
-
@interpreter.interpret { dump(load('in').filter {
|
328
|
+
@interpreter.interpret { dump(load('in').filter { a == 3 }) }
|
284
329
|
@interpreter.to_pig_latin.should match(/FILTER \w+ BY a == 3/)
|
285
330
|
end
|
286
331
|
|
287
332
|
it 'outputs a FILTER statement with a complex test' do
|
288
|
-
@interpreter.interpret { dump(load('in').filter {
|
333
|
+
@interpreter.interpret { dump(load('in').filter { (a > b).and(c.ne(3)) }) }
|
289
334
|
@interpreter.to_pig_latin.should match(/FILTER \w+ BY \(a > b\) AND \(c != 3\)/)
|
290
335
|
end
|
291
336
|
end
|
@@ -293,11 +338,11 @@ describe Piglet do
|
|
293
338
|
describe 'SPLIT' do
|
294
339
|
it 'outputs a SPLIT statement' do
|
295
340
|
@interpreter.interpret do
|
296
|
-
a, b = load('in').split {
|
341
|
+
a, b = load('in').split { [first >= 0, second < 0] }
|
297
342
|
dump(a)
|
298
343
|
dump(b)
|
299
344
|
end
|
300
|
-
@interpreter.to_pig_latin.should match(/SPLIT \w+ INTO \w+ IF
|
345
|
+
@interpreter.to_pig_latin.should match(/SPLIT \w+ INTO \w+ IF first >= 0, \w+ IF second < 0/)
|
301
346
|
end
|
302
347
|
end
|
303
348
|
|
@@ -517,7 +562,7 @@ describe Piglet do
|
|
517
562
|
output = @interpreter.to_pig_latin do
|
518
563
|
define('my_udf', :function => 'com.example.My')
|
519
564
|
a = load('in')
|
520
|
-
b = a.foreach {
|
565
|
+
b = a.foreach { [my_udf('foo', 3, 'hello \'world\'', self[0]).as(:bar)]}
|
521
566
|
store(b, 'out')
|
522
567
|
end
|
523
568
|
output.should match(/FOREACH \w+ GENERATE my_udf\('foo', 3, 'hello \\'world\\'', \$0\) AS bar/)
|
@@ -568,35 +613,35 @@ describe Piglet do
|
|
568
613
|
context 'field expressions' do
|
569
614
|
it 'parenthesizes expressions with different operators' do
|
570
615
|
output = @interpreter.to_pig_latin do
|
571
|
-
store(load('in').filter {
|
616
|
+
store(load('in').filter { self.x.and(self.y.or(self.z)).and(self.w) }, 'out')
|
572
617
|
end
|
573
618
|
output.should include('x AND (y OR z) AND w')
|
574
619
|
end
|
575
620
|
|
576
621
|
it 'doesn\'t parenthesizes expressions with the same operator' do
|
577
622
|
output = @interpreter.to_pig_latin do
|
578
|
-
store(load('in').filter {
|
623
|
+
store(load('in').filter { self.x.and(self.y.and(self.z)).and(self.w) }, 'out')
|
579
624
|
end
|
580
625
|
output.should include('x AND y AND z AND w')
|
581
626
|
end
|
582
627
|
|
583
628
|
it 'doesn\'t parenthesize function calls' do
|
584
629
|
output = @interpreter.to_pig_latin do
|
585
|
-
store(load('in').foreach {
|
630
|
+
store(load('in').foreach { [self.x.max + self.y.min] }, 'out')
|
586
631
|
end
|
587
632
|
output.should include('MAX(x) + MIN(y)')
|
588
633
|
end
|
589
634
|
|
590
635
|
it 'doesn\'t parenthesize a suffix expression followed by an infix expression' do
|
591
636
|
output = @interpreter.to_pig_latin do
|
592
|
-
store(load('in').foreach {
|
637
|
+
store(load('in').foreach { [self.x.null?.or(self.y)] }, 'out')
|
593
638
|
end
|
594
639
|
output.should include('x is null OR y')
|
595
640
|
end
|
596
641
|
|
597
642
|
it 'parenthesizes a prefix expression followed by an infix expression' do
|
598
643
|
output = @interpreter.to_pig_latin do
|
599
|
-
store(load('in').foreach {
|
644
|
+
store(load('in').foreach { [self.x.not.and(self.y)] }, 'out')
|
600
645
|
end
|
601
646
|
output.should include('(NOT x) AND y')
|
602
647
|
end
|
@@ -615,15 +660,15 @@ describe Piglet do
|
|
615
660
|
[:click_thru, :int]
|
616
661
|
])
|
617
662
|
%w(site size name).each do |dimension|
|
618
|
-
result = sessions.group(:ad_id, dimension).foreach do
|
663
|
+
result = sessions.group(:ad_id, dimension).foreach do
|
619
664
|
[
|
620
|
-
|
665
|
+
self[0].ad_id.as(:ad_id),
|
621
666
|
literal(dimension).as(:dimension),
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
667
|
+
self[0].field(dimension).as(:value),
|
668
|
+
self[1].exposure.sum.as(:exposures),
|
669
|
+
self[1].impression.sum.as(:impressions),
|
670
|
+
self[1].engagement.sum.as(:engagements),
|
671
|
+
self[1].click_thru.sum.as(:click_thrus)
|
627
672
|
]
|
628
673
|
end
|
629
674
|
store(result, "report_metrics-#{dimension}")
|
@@ -800,7 +845,7 @@ describe Piglet do
|
|
800
845
|
schema = catch(:schema) do
|
801
846
|
@interpreter.interpret do
|
802
847
|
relation1 = load('in1', :schema => [[:a, :float], [:b, :int]])
|
803
|
-
relation2 = relation1.foreach {
|
848
|
+
relation2 = relation1.foreach { [a] }
|
804
849
|
throw :schema, relation2.schema
|
805
850
|
end
|
806
851
|
end
|
@@ -812,7 +857,7 @@ describe Piglet do
|
|
812
857
|
schema = catch(:schema) do
|
813
858
|
@interpreter.interpret do
|
814
859
|
relation1 = load('in1', :schema => [[:a, :float], [:b, :int]])
|
815
|
-
relation2 = relation1.foreach {
|
860
|
+
relation2 = relation1.foreach { [a.max] }
|
816
861
|
throw :schema, relation2.schema
|
817
862
|
end
|
818
863
|
end
|
@@ -824,7 +869,7 @@ describe Piglet do
|
|
824
869
|
schema = catch(:schema) do
|
825
870
|
@interpreter.interpret do
|
826
871
|
relation1 = load('in1', :schema => [[:a, :float], [:b, :int]])
|
827
|
-
relation2 = relation1.foreach {
|
872
|
+
relation2 = relation1.foreach { [a.count] }
|
828
873
|
throw :schema, relation2.schema
|
829
874
|
end
|
830
875
|
end
|
@@ -836,7 +881,7 @@ describe Piglet do
|
|
836
881
|
schema = catch(:schema) do
|
837
882
|
@interpreter.interpret do
|
838
883
|
relation1 = load('in1', :schema => [[:a, :float], [:b, :int]])
|
839
|
-
relation2 = relation1.foreach {
|
884
|
+
relation2 = relation1.foreach { [a.count.as(:x)] }
|
840
885
|
throw :schema, relation2.schema
|
841
886
|
end
|
842
887
|
end
|
@@ -847,7 +892,7 @@ describe Piglet do
|
|
847
892
|
schema = catch(:schema) do
|
848
893
|
@interpreter.interpret do
|
849
894
|
relation1 = load('in1', :schema => [[:a, :float], [:b, :int]])
|
850
|
-
relation2 = relation1.foreach {
|
895
|
+
relation2 = relation1.foreach { [literal('blipp')] }
|
851
896
|
throw :schema, relation2.schema
|
852
897
|
end
|
853
898
|
end
|
@@ -858,7 +903,7 @@ describe Piglet do
|
|
858
903
|
schema = catch(:schema) do
|
859
904
|
@interpreter.interpret do
|
860
905
|
relation1 = load('in1', :schema => [[:a, :float], [:b, :int]])
|
861
|
-
relation2 = relation1.foreach {
|
906
|
+
relation2 = relation1.foreach { [literal(4)] }
|
862
907
|
throw :schema, relation2.schema
|
863
908
|
end
|
864
909
|
end
|
@@ -869,7 +914,7 @@ describe Piglet do
|
|
869
914
|
schema = catch(:schema) do
|
870
915
|
@interpreter.interpret do
|
871
916
|
relation1 = load('in1', :schema => [[:a, :float], [:b, :int]])
|
872
|
-
relation2 = relation1.foreach {
|
917
|
+
relation2 = relation1.foreach { [literal(3.14)] }
|
873
918
|
throw :schema, relation2.schema
|
874
919
|
end
|
875
920
|
end
|
data/spec/spec_helper.rb
CHANGED
data/tasks/gem.rake
CHANGED
@@ -1,21 +1,18 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
Jeweler::GemcutterTasks.new
|
20
|
-
rescue LoadError
|
21
|
-
end
|
3
|
+
require 'jeweler'
|
4
|
+
|
5
|
+
Jeweler::Tasks.new do |gem|
|
6
|
+
gem.name = "piglet"
|
7
|
+
gem.summary = %Q{Piglet is a DSL for Pig scripts}
|
8
|
+
gem.description = %Q{Piglet aims to look like Pig Latin while allowing for things like loops and control of flow that are missing from Pig.}
|
9
|
+
gem.email = "theo@iconara.net"
|
10
|
+
gem.homepage = "http://github.com/iconara/piglet"
|
11
|
+
gem.authors = ["Theo Hultberg"]
|
12
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
13
|
+
gem.version = Piglet::VERSION
|
14
|
+
gem.test_files = FileList['spec/**/*.rb']
|
15
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
+
end
|
17
|
+
|
18
|
+
Jeweler::GemcutterTasks.new
|
data/tasks/rdoc.rake
CHANGED
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: piglet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 19
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Theo Hultberg
|
@@ -9,19 +15,25 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date: 2010-
|
18
|
+
date: 2010-07-09 00:00:00 +02:00
|
13
19
|
default_executable: piglet
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
|
-
name: rspec
|
17
22
|
type: :development
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
name: rspec
|
25
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
20
27
|
requirements:
|
21
28
|
- - ">="
|
22
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 13
|
31
|
+
segments:
|
32
|
+
- 1
|
33
|
+
- 2
|
34
|
+
- 9
|
23
35
|
version: 1.2.9
|
24
|
-
|
36
|
+
requirement: *id001
|
25
37
|
description: Piglet aims to look like Pig Latin while allowing for things like loops and control of flow that are missing from Pig.
|
26
38
|
email: theo@iconara.net
|
27
39
|
executables:
|
@@ -31,10 +43,11 @@ extensions: []
|
|
31
43
|
extra_rdoc_files:
|
32
44
|
- LICENSE
|
33
45
|
- README.rdoc
|
34
|
-
- TODO
|
35
46
|
files:
|
36
47
|
- .document
|
37
48
|
- .gitignore
|
49
|
+
- Gemfile
|
50
|
+
- Gemfile.lock
|
38
51
|
- LICENSE
|
39
52
|
- README.rdoc
|
40
53
|
- Rakefile
|
@@ -42,9 +55,11 @@ files:
|
|
42
55
|
- lib/piglet.rb
|
43
56
|
- lib/piglet/field/binary_conditional.rb
|
44
57
|
- lib/piglet/field/call_expression.rb
|
58
|
+
- lib/piglet/field/direct_expression.rb
|
45
59
|
- lib/piglet/field/field.rb
|
46
60
|
- lib/piglet/field/infix_expression.rb
|
47
61
|
- lib/piglet/field/literal.rb
|
62
|
+
- lib/piglet/field/map_value.rb
|
48
63
|
- lib/piglet/field/prefix_expression.rb
|
49
64
|
- lib/piglet/field/reference.rb
|
50
65
|
- lib/piglet/field/rename.rb
|
@@ -62,6 +77,7 @@ files:
|
|
62
77
|
- lib/piglet/param/declare.rb
|
63
78
|
- lib/piglet/param/default.rb
|
64
79
|
- lib/piglet/param/parameter_statement.rb
|
80
|
+
- lib/piglet/relation/block_context.rb
|
65
81
|
- lib/piglet/relation/cogroup.rb
|
66
82
|
- lib/piglet/relation/cross.rb
|
67
83
|
- lib/piglet/relation/distinct.rb
|
@@ -70,6 +86,7 @@ files:
|
|
70
86
|
- lib/piglet/relation/group.rb
|
71
87
|
- lib/piglet/relation/join.rb
|
72
88
|
- lib/piglet/relation/limit.rb
|
89
|
+
- lib/piglet/relation/nested_foreach.rb
|
73
90
|
- lib/piglet/relation/order.rb
|
74
91
|
- lib/piglet/relation/relation.rb
|
75
92
|
- lib/piglet/relation/sample.rb
|
@@ -80,6 +97,7 @@ files:
|
|
80
97
|
- lib/piglet/schema/tuple.rb
|
81
98
|
- lib/piglet/udf/define.rb
|
82
99
|
- lib/piglet/udf/register.rb
|
100
|
+
- piglet.gemspec
|
83
101
|
- spec/piglet/field/binary_conditional_spec.rb
|
84
102
|
- spec/piglet/field/field_spec.rb
|
85
103
|
- spec/piglet/field/infix_expression_spec.rb
|
@@ -96,7 +114,6 @@ files:
|
|
96
114
|
- tasks/gem.rake
|
97
115
|
- tasks/rdoc.rake
|
98
116
|
- tasks/spec.rake
|
99
|
-
- TODO
|
100
117
|
has_rdoc: true
|
101
118
|
homepage: http://github.com/iconara/piglet
|
102
119
|
licenses: []
|
@@ -107,21 +124,27 @@ rdoc_options:
|
|
107
124
|
require_paths:
|
108
125
|
- lib
|
109
126
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
none: false
|
110
128
|
requirements:
|
111
129
|
- - ">="
|
112
130
|
- !ruby/object:Gem::Version
|
131
|
+
hash: 3
|
132
|
+
segments:
|
133
|
+
- 0
|
113
134
|
version: "0"
|
114
|
-
version:
|
115
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
none: false
|
116
137
|
requirements:
|
117
138
|
- - ">="
|
118
139
|
- !ruby/object:Gem::Version
|
140
|
+
hash: 3
|
141
|
+
segments:
|
142
|
+
- 0
|
119
143
|
version: "0"
|
120
|
-
version:
|
121
144
|
requirements: []
|
122
145
|
|
123
146
|
rubyforge_project:
|
124
|
-
rubygems_version: 1.3.
|
147
|
+
rubygems_version: 1.3.7
|
125
148
|
signing_key:
|
126
149
|
specification_version: 3
|
127
150
|
summary: Piglet is a DSL for Pig scripts
|