Skip to content

Commit 32d79c6

Browse files
DOCSP-14109 Update ADL Docs for unsupported stages and operators (#127)
* DOCSP-14109 Update ADL Docs for unsupported stages and operators * DOCSP-14109 updates for feedback * DOCSP-14109 updates for copy review feedback
1 parent 3413476 commit 32d79c6

File tree

5 files changed

+164
-31
lines changed

5 files changed

+164
-31
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
By default, {+adl+} does not return documents in any specific order
2+
for queries on {+dl+}s for |s3| data stores. {+adl+} reads the
3+
partitions concurrently and the underlying storage response order
4+
determines which documents {+adl+} returns first, unless you define
5+
order using :pipeline:`$sort` in your query. For example, if you run
6+
the same ``findOne()`` query twice, you could see different documents,
7+
and if you use :pipeline:`$skip`, different documents might be skipped
8+
if :pipeline:`$sort` is not used in the query.

source/query/query-data-lake.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ changes. If your query contains multiple stages, each stage receives
9999
the most recent data available from the data store as that stage is
100100
processed.
101101

102+
.. include:: /includes/fact-doc-order-in-query-result.rst
103+
102104
.. _query-atlas:
103105

104106
Querying Data in Your |service| Cluster

source/supported-unsupported.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ This section contains the following:
2020

2121
/supported-unsupported/supported-data-formats
2222
/supported-unsupported/mql-support
23+
/supported-unsupported/supported-aggregation

source/supported-unsupported/mql-support.txt

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,42 +39,31 @@ Aggregation Commands
3939

4040
* - :manual:`aggregate </reference/command/aggregate>`
4141

42-
- The following limitations apply:
43-
44-
* {+adl+} supports the ``explain``, ``cursor``, ``comment``,
45-
and ``background`` options only. For the ``comment`` option,
46-
{+adl+} supports only type ``string``. {+adl+} supports
47-
``{"background" : <boolean>}`` option for
48-
:ref:`adl-out-stage` to |s3| and |service| cluster only. The
49-
``background`` option is not available for other
50-
:manual:`aggregation pipeline stages
51-
</reference/operator/aggregation-pipeline>`. See
52-
:ref:`$out Options <adl-out-stage-options>` for more
53-
information.
54-
* {+adl+} supports :pipeline:`$geoNear` and
55-
:pipeline:`$graphLookup` :manual:`aggregation pipeline stages
56-
</reference/operator/aggregation-pipeline>` in queries on
57-
{+dl+} collections that are mapped to one |service| collection
58-
only. {+adl+} doesn't support these :manual:`aggregation
59-
pipeline stages </reference/operator/aggregation-pipeline>`
60-
for:
61-
62-
- |s3| or |http| {+data-lake-stores+}.
63-
- Queries on {+dl+} collections that are mapped to multiple
64-
|service| collections.
65-
66-
See :ref:`query-atlas` for more information.
67-
* {+adl+} Doesn't support the ``$collStats``, ``$indexStats``,
68-
``$listLocalSessions``, and ``$listSessions``
69-
:manual:`aggregation pipeline stages
70-
</reference/operator/aggregation-pipeline>`.
42+
- The following limitation applies:
43+
44+
{+adl+} supports the ``explain``, ``cursor``, ``comment``,
45+
and ``background`` options only.
46+
47+
For the ``comment`` option, {+adl+} supports only type
48+
``string``.
49+
50+
{+adl+} supports ``{"background" : <boolean>}`` option for
51+
:ref:`adl-out-stage` to |s3| and |service| cluster only. The
52+
``background`` option is not available for other
53+
:manual:`aggregation pipeline stages
54+
</reference/operator/aggregation-pipeline>`. See :ref:`$out
55+
Options <adl-out-stage-options>` for more information.
56+
57+
.. seealso::
58+
59+
:ref:`data-lake-agg-support`.
7160

7261
* - :manual:`count </reference/command/count>`
7362

7463
- The following limitations apply:
7564

76-
* {+adl+} converts ``count()`` to an aggregation pipeline internal
77-
to |data-lake|.
65+
* {+adl+} converts ``count()`` to an aggregation pipeline
66+
internal to |data-lake|.
7867
* {+adl+} supports only the ``query`` option.
7968

8069
Diagnostic Commands
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
.. _data-lake-agg-support:
2+
3+
===================================================
4+
Supported Aggregation Pipeline Stages and Operators
5+
===================================================
6+
7+
This page describes the MongoDB :manual:`aggregation </aggregation/>`
8+
pipeline :manual:`stages </reference/operator/aggregation-pipeline/>`
9+
and :manual:`operators </reference/operator/aggregation/>` that {+adl+}
10+
supports.
11+
12+
.. note::
13+
14+
.. include:: /includes/fact-doc-order-in-query-result.rst
15+
16+
.. _supported-stages:
17+
18+
Supported and Unsupported Aggregation Pipeline Stages
19+
-----------------------------------------------------
20+
21+
{+adl+} supports all the aggregation pipeline stages except the
22+
following:
23+
24+
- :pipeline:`$indexStats`
25+
- :pipeline:`$listSessions`
26+
- :pipeline:`$listLocalSessions`
27+
- :pipeline:`$merge`
28+
- :pipeline:`$planCacheStats`
29+
30+
For the following stages in {+adl+} queries, {+adl+} introduces an
31+
alternate syntax, includes a caveat, or deviates from :manual:`server
32+
</reference/operator/aggregation-pipeline/>`. See the *Description*
33+
column for details.
34+
35+
.. list-table::
36+
:header-rows: 1
37+
:widths: 30 70
38+
39+
* - Pipeline Stage
40+
- Description
41+
42+
* - :pipeline:`$geoNear`
43+
- Outputs documents in order of nearest to farthest from a
44+
specified point. {+adl+} supports :pipeline:`$geoNear` in
45+
queries on {+dl+} collections that are mapped to one |service|
46+
collection only. {+adl+} doesn't support :pipeline:`$geoNear`
47+
for:
48+
49+
- |s3| or |http| {+data-lake-stores+}.
50+
- Queries on {+dl+} collections that are mapped to multiple
51+
|service| collections.
52+
53+
See :ref:`query-atlas` for more information.
54+
55+
* - :pipeline:`$graphLookup`
56+
- Performs a recursive search on a collection. {+adl+} supports
57+
:pipeline:`$graphLookup` in queries on {+dl+} collections
58+
that are mapped to one |service| collection only. {+adl+}
59+
doesn't support :pipeline:`$graphLookup` for:
60+
61+
- |s3| or |http| {+data-lake-stores+}.
62+
- Queries on {+dl+} collections that are mapped to multiple
63+
|service| collections.
64+
65+
See :ref:`query-atlas` for more information.
66+
67+
* - :pipeline:`$lookup`
68+
- Performs a left outer join to a collection in the same database.
69+
{+adl+} provides syntax for joining collections from different
70+
databases also. See :ref:`adl-lookup-stage` for more information.
71+
72+
* - :pipeline:`$match`
73+
- Filters the documents to pass only the documents that match the
74+
specified condition(s) to the next pipeline stage. {+adl+}
75+
supports :pipeline:`$match`. Note that the :ref:`partition
76+
attributes <datalake-path-attribute-types>` for selecting
77+
specific files on |s3| are only optimized for the following
78+
:manual:`aggregation pipeline operators
79+
</reference/operator/aggregation/>`: :manual:`$eq
80+
</reference/operator/aggregation/eq/>`, :manual:`$gt
81+
</reference/operator/aggregation/gt/>`, :manual:`$lt
82+
</reference/operator/aggregation/lt/>`, :manual:`$gte
83+
</reference/operator/aggregation/gte/>`, :manual:`$lte
84+
</reference/operator/aggregation/lte/>`, :manual:`$ne
85+
</reference/operator/aggregation/ne/>`, :manual:`$and
86+
</reference/operator/aggregation/and/>`, :manual:`$or
87+
</reference/operator/aggregation/or/>`.
88+
89+
* - :pipeline:`$out`
90+
- Takes the documents returned by the aggregation pipeline and
91+
writes them to a specified collection. {+adl+} provides
92+
alternate syntax for writing to |s3| and |service| cluster. See
93+
:ref:`adl-out-stage` for more information.
94+
95+
* - :pipeline:`$sample`
96+
- Randomly selects the specified number of documents from its
97+
input. {+adl+} supports ``$sample``, but does not provide a
98+
truly random sample and returns the first set of documents that
99+
it finds.
100+
101+
* - :pipeline:`$skip`
102+
- Skips over the specified number of documents that pass into the
103+
stage and passes the remaining documents to the next stage in
104+
the pipeline. {+adl+} supports ``$skip``, but this does not
105+
reduce data scan because {+dl+} accesses all partitions that
106+
correspond to your query.
107+
108+
.. _supported-operators:
109+
110+
Supported Aggregation Pipeline Operators
111+
----------------------------------------
112+
113+
{+adl+} supports all the aggregation pipeline operators. However,
114+
{+adl+} supports all the :manual:`geospatial query operators
115+
</reference/operator/query-geospatial/>` and the following
116+
:manual:`evaluation query operators
117+
</reference/operator/query-evaluation/>` only in queries on
118+
collections that are mapped to an |service| cluster data store:
119+
120+
.. list-table::
121+
:header-rows: 1
122+
:widths: 30 70
123+
124+
* - Pipeline Stage
125+
- Description
126+
127+
* - :manual:`$text </reference/operator/query/text/>`
128+
- Performs a text search on the content of the fields indexed with
129+
a text index.
130+
131+
* - :manual:`$where </reference/operator/query/where/>`
132+
- Passes either a string containing a JavaScript expression or a
133+
full JavaScript function to the query system.

0 commit comments

Comments
 (0)