alf 0.9.0 → 0.9.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.
- data/CHANGELOG.md +64 -0
- data/Gemfile.lock +4 -4
- data/README.md +257 -171
- data/TODO.md +4 -4
- data/alf.gemspec +3 -3
- data/alf.noespec +11 -6
- data/examples/pseudo-with.alf +7 -0
- data/examples/runall.sh +2 -2
- data/examples/unwrap.alf +4 -0
- data/examples/wrap.alf +2 -0
- data/lib/alf/relation.rb +118 -0
- data/lib/alf/version.rb +1 -1
- data/lib/alf.rb +320 -169
- data/spec/integration/src/test_minus.alf +5 -0
- data/spec/integration/src/test_project.alf +9 -0
- data/spec/{alf_spec.rb → integration/test_alf.rb} +8 -21
- data/spec/integration/test_alf_specs.rb +37 -0
- data/spec/{examples_spec.rb → integration/test_examples.rb} +1 -1
- data/spec/spec_helper.rb +19 -1
- data/spec/unit/environment/examples/suppliers.rash +5 -0
- data/spec/{environment/explicit_spec.rb → unit/environment/test_explicit.rb} +0 -0
- data/spec/{environment/folder_spec.rb → unit/environment/test_folder.rb} +1 -1
- data/spec/{operator → unit/operator}/non_relational/compact/buffer_based.rb +0 -0
- data/spec/{operator/non_relational/compact/sort_based_spec.rb → unit/operator/non_relational/compact/test_sort_based.rb} +0 -0
- data/spec/{operator/non_relational/autonum_spec.rb → unit/operator/non_relational/test_autonum.rb} +0 -0
- data/spec/{operator/non_relational/clip_spec.rb → unit/operator/non_relational/test_clip.rb} +0 -0
- data/spec/{operator/non_relational/compact_spec.rb → unit/operator/non_relational/test_compact.rb} +0 -0
- data/spec/{operator/non_relational/defaults_spec.rb → unit/operator/non_relational/test_defaults.rb} +0 -0
- data/spec/{operator/non_relational/sort_spec.rb → unit/operator/non_relational/test_sort.rb} +0 -0
- data/spec/{operator/relational/join/hash_based_spec.rb → unit/operator/relational/join/test_hash_based.rb} +0 -0
- data/spec/unit/operator/relational/summarize/test_hash_based.rb +38 -0
- data/spec/{operator/relational/summarize/sort_based_spec.rb → unit/operator/relational/summarize/test_sort_based.rb} +0 -0
- data/spec/{operator/relational/extend_spec.rb → unit/operator/relational/test_extend.rb} +0 -0
- data/spec/{operator/relational/group_spec.rb → unit/operator/relational/test_group.rb} +3 -2
- data/spec/{operator/relational/intersect_spec.rb → unit/operator/relational/test_intersect.rb} +0 -0
- data/spec/unit/operator/relational/test_join.rb +36 -0
- data/spec/{operator/relational/minus_spec.rb → unit/operator/relational/test_minus.rb} +0 -0
- data/spec/{operator/relational/project_spec.rb → unit/operator/relational/test_project.rb} +0 -0
- data/spec/{operator/relational/quota_spec.rb → unit/operator/relational/test_quota.rb} +0 -0
- data/spec/{operator/relational/rename_spec.rb → unit/operator/relational/test_rename.rb} +0 -0
- data/spec/{operator/relational/restrict_spec.rb → unit/operator/relational/test_restrict.rb} +0 -0
- data/spec/unit/operator/relational/test_summarize.rb +64 -0
- data/spec/{operator/relational/ungroup_spec.rb → unit/operator/relational/test_ungroup.rb} +0 -0
- data/spec/{operator/relational/union_spec.rb → unit/operator/relational/test_union.rb} +0 -0
- data/spec/{operator/relational/unnest_spec.rb → unit/operator/relational/test_unwrap.rb} +5 -5
- data/spec/{operator/relational/nest_spec.rb → unit/operator/relational/test_wrap.rb} +5 -5
- data/spec/{operator/command_methods_spec.rb → unit/operator/test_command_methods.rb} +0 -0
- data/spec/unit/operator/test_non_relational.rb +18 -0
- data/spec/unit/operator/test_relational.rb +27 -0
- data/spec/{reader → unit/reader}/input.rb +0 -0
- data/spec/unit/reader/test_alf_file.rb +27 -0
- data/spec/{reader/rash_spec.rb → unit/reader/test_rash.rb} +0 -0
- data/spec/unit/relation/test_coerce.rb +53 -0
- data/spec/unit/relation/test_inspect.rb +20 -0
- data/spec/unit/relation/test_relops.rb +46 -0
- data/spec/{renderer/text/cell_spec.rb → unit/renderer/text/test_cell.rb} +0 -0
- data/spec/{renderer/text/row_spec.rb → unit/renderer/text/test_row.rb} +0 -0
- data/spec/{renderer/text/table_spec.rb → unit/renderer/text/test_table.rb} +0 -0
- data/spec/{aggregator_spec.rb → unit/test_aggregator.rb} +6 -6
- data/spec/{assumptions_spec.rb → unit/test_assumptions.rb} +0 -0
- data/spec/{lispy_spec.rb → unit/test_lispy.rb} +0 -0
- data/spec/unit/test_operator.rb +16 -0
- data/spec/{reader_spec.rb → unit/test_reader.rb} +4 -0
- data/spec/unit/test_relation.rb +40 -0
- data/spec/{renderer_spec.rb → unit/test_renderer.rb} +0 -0
- data/spec/{tools/ordering_key_spec.rb → unit/tools/test_ordering_key.rb} +0 -0
- data/spec/{tools/projection_key_spec.rb → unit/tools/test_projection_key.rb} +0 -0
- data/spec/{tools/tools_spec.rb → unit/tools/test_tools.rb} +0 -0
- data/spec/{tools/tuple_handle_spec.rb → unit/tools/test_tuple_handle.rb} +0 -0
- data/tasks/clean.rake +3 -0
- data/tasks/spec_test.rake +1 -1
- metadata +143 -114
- data/examples/nest.alf +0 -2
- data/examples/unnest.alf +0 -4
- data/examples/with.alf +0 -23
- data/spec/operator/relational/summarize_spec.rb +0 -41
- data/spec/reader/alf_file_spec.rb +0 -15
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
+
# 0.9.1 / 2011.07.13
|
|
2
|
+
|
|
3
|
+
* Enhancements (public APIs)
|
|
4
|
+
|
|
5
|
+
* Added the in-memory Alf::Relation data structure and associated tooling.
|
|
6
|
+
This allows using Alf in a object-oriented usual way, in addition to the
|
|
7
|
+
functional DSL:
|
|
8
|
+
|
|
9
|
+
Alf.lispy.evaluate {
|
|
10
|
+
(join (restrict :suppliers, lambda{ status > 10 }), :cities)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
is equivalent to
|
|
14
|
+
|
|
15
|
+
suppliers, cities = [...], [...]
|
|
16
|
+
suppliers.restrict(lambda{ status > 10 }).join(cities)
|
|
17
|
+
|
|
18
|
+
see README about how to obtain suppliers and cities relations in the first
|
|
19
|
+
place.
|
|
20
|
+
|
|
21
|
+
* Summarize now accepts a --allbut option, to specify 'by' attributes from an
|
|
22
|
+
exclusion perspective
|
|
23
|
+
|
|
24
|
+
* .alf files are now evaluated in such a way that backtraces are "traceability
|
|
25
|
+
friendly"
|
|
26
|
+
|
|
27
|
+
* Non backward-compatible changes to public APIs
|
|
28
|
+
|
|
29
|
+
* Lispy#with has been removed because not being stable enough. The clean way
|
|
30
|
+
of reusing sub-queries is as follows (non purely functional, so far)
|
|
31
|
+
|
|
32
|
+
kept_suppliers = (restrict :suppliers, lambda{ status > 10 })
|
|
33
|
+
with_countries = (join kept_suppliers, :cities)
|
|
34
|
+
supplying = (join with_countries, :supplies)
|
|
35
|
+
(summarize supplying,
|
|
36
|
+
[:country],
|
|
37
|
+
:which => Agg::group(:pid),
|
|
38
|
+
:total => Agg::sum{ qty })
|
|
39
|
+
|
|
40
|
+
* As a consequence, named data sources (Symbols, like :suppliers above) are
|
|
41
|
+
now resolved at compile time, which is less powerful, yet much simpler and
|
|
42
|
+
sound.
|
|
43
|
+
|
|
44
|
+
* Nest and Unnest have been renamed to Wrap and Unwrap respectively. This is
|
|
45
|
+
to better conform to TUTORIAL D's terminology.
|
|
46
|
+
|
|
47
|
+
* Lispy#chain was kept public in 0.9.0 by error and has been entirely removed
|
|
48
|
+
from the DSL.
|
|
49
|
+
|
|
50
|
+
* Enhancements (internals)
|
|
51
|
+
|
|
52
|
+
* Reader.reader delegates to Reader.coerce when its first argument is not
|
|
53
|
+
a String. This allows calling Reader.reader(args.first || $stdin) in quickl
|
|
54
|
+
commands for example.
|
|
55
|
+
|
|
56
|
+
* Operator, Operator::Relational and Operator::NonRelational have a .each
|
|
57
|
+
class method that yields operator classes
|
|
58
|
+
|
|
59
|
+
* Bug fixes
|
|
60
|
+
|
|
61
|
+
* Fixed a bug that led to an Nil error when using unary operators on $stdin
|
|
62
|
+
* Fixed a bug when summarizing or sorting on Symbol attributes with ruby 1.8
|
|
63
|
+
* Fixed numerous crashes under rubinius
|
|
64
|
+
|
|
1
65
|
# 0.9.0 / 2011.06.19
|
|
2
66
|
|
|
3
67
|
* Enhancements
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
alf (0.9.
|
|
4
|
+
alf (0.9.1)
|
|
5
5
|
quickl (~> 0.2.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -14,8 +14,8 @@ GEM
|
|
|
14
14
|
highline (~> 1.6.0)
|
|
15
15
|
quickl (~> 0.2.0)
|
|
16
16
|
wlang (~> 0.10.1)
|
|
17
|
-
quickl (0.2.
|
|
18
|
-
rake (0.
|
|
17
|
+
quickl (0.2.2)
|
|
18
|
+
rake (0.9.2)
|
|
19
19
|
rspec (2.6.0)
|
|
20
20
|
rspec-core (~> 2.6.0)
|
|
21
21
|
rspec-expectations (~> 2.6.0)
|
|
@@ -36,7 +36,7 @@ DEPENDENCIES
|
|
|
36
36
|
bluecloth (~> 2.0.9)
|
|
37
37
|
bundler (~> 1.0)
|
|
38
38
|
noe (~> 1.3.0)
|
|
39
|
-
rake (~> 0.
|
|
39
|
+
rake (~> 0.9.2)
|
|
40
40
|
rspec (~> 2.6.0)
|
|
41
41
|
wlang (~> 0.10.1)
|
|
42
42
|
yard (~> 0.7.2)
|