Hi Mihail,
1.
The Unnest operator accepts a sequence generating expression and for
each item in the sequence, produces a tuple with 1 variable bound to
that item. The UnnestMap is similar in that it accepts a sequence
generating function. However, the sequence generating function produces
tuples and for each tuple, the UnnestMap produces a tuple with multiple
variables (each variable is bound to the corresponding field in the
tuple produced by the sequence expression). You can see this operator
being used in AsterixDB to access data stored in indexes. The sequence
expression in this case is the "search" function that probes the index
and produces [Key, Value] tuples. The UnnestMap then binds two
variables, one for the key and one for the value.
The Write/WriteResult operators are not named well. The Write operator
was used in the past to produce results of queries in the past. Systems
sing Algebricks should start moving away from Write to using
DistributeResults for result handling. DistributeResults provides a more
general framework for capturing results of a query and then making it
available to a client (over the network). The Write operator was a
limited way of handing results because it needed to be scheduled at a
location where the client could then read the file that was produced.
The WriteResults operator is used in "INSERT INTO foo SELECT FROM"
scenarios to produce a new dataset in the system. It has nothing to do
with query results (although the name suggests that it does).
The Sink operator is a no-op operator that accepts and silently discards
data. Every well-formed algebricks expression must be terminated by an
operator that consumes data but does not produce data. The Sink operator
is used to terminate plans which do not use
Write/WriteResults/DistributeResults operators. You can see this in
AsterixDB for insert pipelines where the plan inserts data into one or
more indexes. Each index inserting operator consumes tuples and forwards
the tuples to the next operator in the plan. So we can have as many
index inserting operators as indexes that need to be updated. Such a
plan is finally terminated with a Sink operator.
2. I do not think we have a scenario where the PartitioningSplit
operator is used yet.
Vinayak
> > > <mailto:
hyracks-user...@googlegroups.com
> > <mailto:
hyracks-user...@googlegroups.com>.
> <mailto:
hyracks-user...@googlegroups.com>.