Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
c8d62aea
Commit
c8d62aea
authored
Jul 10, 2007
by
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
Changes
2
Show whitespace changes
Inline
Side-by-side
CHANGES
View file @
c8d62aea
...
...
@@ -26,13 +26,18 @@ Since 0.2.2
* Removed the validate tool.
- Implementation:
* Various bug fixes
* More efficient hash-consing of types
* improved #print_type (does not use the abbreviation for the printed type)
* Various bug fixes
.
* More efficient hash-consing of types
.
* improved #print_type (does not use the abbreviation for the printed type)
.
- 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
...
...
query/query_aggregates.ml
View file @
c8d62aea
...
...
@@ -42,16 +42,14 @@ let query_distinct v =
Value
.
ValueSet
.
empty
v
in
Value
.
sequence
(
Value
.
ValueSet
.
elements
s
)
(* todo : typage precis pour min et max et distinct_values *)
open
Operators
;;
open
Operators
open
Builtin_defs
;;
register_fun
"min"
(
Sequence
.
plus
any
)
any
query_min
;;
register_fun
"max"
(
Sequence
.
plus
any
)
any
query_max
;;
register_fun
"sum"
(
Sequence
.
star
int
)
int
query_sum
;;
register_unary
"min"
(
fun
f
_
_
->
Sequence
.
approx
(
f
any
true
))
query_min
;
register_unary
"max"
(
fun
f
_
_
->
Sequence
.
approx
(
f
any
true
))
query_max
;
register_fun
"avg"
(
Sequence
.
plus
int
)
int
query_avg
;;
register_fun
"count"
Sequence
.
any
int
query_count
;;
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
;;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment