Commit c8d62aea authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-03-06 12:23:39 by afrisch] Typage plus prs de min,max,distinct_values

Original author: afrisch
Date: 2005-03-06 12:25:10+00:00
parent 47a9ca77
...@@ -26,13 +26,18 @@ Since 0.2.2 ...@@ -26,13 +26,18 @@ Since 0.2.2
* Removed the validate tool. * Removed the validate tool.
- Implementation: - Implementation:
* Various bug fixes * Various bug fixes.
* More efficient hash-consing of types * More efficient hash-consing of types.
* improved #print_type (does not use the abbreviation for the printed type) * improved #print_type (does not use the abbreviation for the printed type).
- Distribution: - Distribution:
* MIT license * MIT license.
- CQL:
* Rewrote the optimization (pushing projections).
* The syntax for "where" clause is now simply an "and"-separated
list of conditions ("or" is no longer supported).
* Better types for "min","max","distinct_values" operators.
0.2.2 0.2.2
......
...@@ -42,16 +42,14 @@ let query_distinct v = ...@@ -42,16 +42,14 @@ let query_distinct v =
Value.ValueSet.empty v in Value.ValueSet.empty v in
Value.sequence (Value.ValueSet.elements s) Value.sequence (Value.ValueSet.elements s)
(* todo : typage precis pour min et max et distinct_values *) open Operators
open Operators;;
open Builtin_defs;; open Builtin_defs;;
register_fun "min" (Sequence.plus any) any query_min;; register_unary "min" (fun f _ _ -> Sequence.approx (f any true)) query_min;
register_fun "max" (Sequence.plus any) any query_max;; register_unary "max" (fun f _ _ -> Sequence.approx (f any true)) query_max;
register_fun "sum" (Sequence.star int) int query_sum;;
register_fun "avg" (Sequence.plus int) int query_avg;; register_fun "avg" (Sequence.plus int) int query_avg;;
register_fun "count" Sequence.any int query_count;; register_fun "count" Sequence.any int query_count;;
register_fun "member" (Sequence.plus any) bool query_member;; register_fun "member" (Sequence.plus any) bool query_member;;
register_fun "distinct_values" Sequence.any Sequence.any query_distinct;; register_unary "distinct_values"
(fun f _ _ -> Sequence.star (Sequence.approx (f any true))) query_distinct;;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment