Standardise the vocabulary of pipeline, stage, clause, operator. A pipeline consists of stages. Each stage may be an operator, which modifies the data stream without accessing the database (e.g. count, mean($x)), or a clause, which may fetch data from the database to modify the stream (e.g. match, fetch).
list() stream reduce operator.
$x in [$a, $b, $c] and other list expressions now allowed in in-statements (previously stream-only)
New fetch syntax sample
... # incoming pipeline
fetch {
# Printing values directly from pipeline
"key_1": $x, # var $x (from input stream) holds a value or list
"key_2": <EXPR>, # <EXPR> is an expression like $x + $y
# Inline attribute retrieval variations
"key_3": $y.attr, # var $y holds an object with singleton attribute 'attr'
"key_4": [ $y.attr ], # object var $y has multiple attributes 'attr'
"key_5": $y.attr[], # object var $y has a list attribute 'attr'
# Function call variations
"key_6": my_fun1($x,$y), # function my_fun1 has single-return
"key_7": [ my_fun2($x,$y) ], # function my_fun2 has stream-return
# Match-fetch subqueries
"key_8": [
match ...;
fetch {
"sub_key": $z,
...
};
]
# Match-reduce-value subqueries
"key_9":
match ...;
reduce agg($z); # agg could be, e.g., 'count', 'sum', or 'list'
# Nested keys: Nothing stops you from nesting the above!
"super_key": {
"sub_key_1": $x,
"sub_key_2": $y.attr,
"sub_key_3": [
... # some subquery
]
}
};
Usage and product changes
fetch
syntax (see below).pipeline
,stage
,clause
,operator
. A pipeline consists of stages. Each stage may be an operator, which modifies the data stream without accessing the database (e.g.count
,mean($x)
), or a clause, which may fetch data from the database to modify the stream (e.g.match
,fetch
).list()
stream reduce operator.$x in [$a, $b, $c]
and other list expressions now allowed inin
-statements (previously stream-only)New
fetch
syntax sample