Skip to content

Commit

Permalink
Add row pattern recognition functions to list of functions
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky authored and mosabua committed Jul 10, 2023
1 parent 9650869 commit 3d708d4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/src/main/sphinx/functions/list-by-topic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,17 @@ For more details, see :doc:`regexp`
* :func:`regexp_replace`
* :func:`regexp_split`

Row pattern recognition expressions
-----------------------------------

* :ref:`classifier <classifier-function>`
* :ref:`first <logical-navigation-functions>`
* :ref:`last <logical-navigation-functions>`
* :ref:`match_number <match-number-function>`
* :ref:`next <physical-navigation-functions>`
* :ref:`permute <permute-function>`
* :ref:`prev <physical-navigation-functions>`

Session
-------

Expand Down
7 changes: 7 additions & 0 deletions docs/src/main/sphinx/functions/list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ C
- :func:`checksum`
- :func:`chr`
- :func:`classify`
- :ref:`classifier <classifier-function>`
- :ref:`coalesce <coalesce-function>`
- :func:`codepoint`
- :func:`color`
Expand Down Expand Up @@ -157,6 +158,7 @@ F

- :func:`features`
- :func:`filter`
- :ref:`first <logical-navigation-functions>`
- :func:`first_value`
- :func:`flatten`
- :func:`floor`
Expand Down Expand Up @@ -252,6 +254,7 @@ L
-

- :func:`lag`
- :ref:`last <logical-navigation-functions>`
- :func:`last_day_of_month`
- :func:`last_value`
- :func:`lead`
Expand Down Expand Up @@ -291,6 +294,7 @@ M
- :func:`map_union`
- :func:`map_values`
- :func:`map_zip_with`
- :ref:`match_number <match-number-function>`
- :func:`max`
- :func:`max_by`
- :func:`md5`
Expand All @@ -310,6 +314,7 @@ N
-

- :func:`nan`
- :ref:`next <physical-navigation-functions>`
- :func:`ngrams`
- :func:`none_match`
- :func:`normal_cdf`
Expand All @@ -336,10 +341,12 @@ P
- :func:`parse_duration`
- :func:`parse_data_size`
- :func:`percent_rank`
- :ref:`permute <permute-function>`
- :func:`pi`
- :func:`position`
- :func:`pow`
- :func:`power`
- :ref:`prev <physical-navigation-functions>`

Q
-
Expand Down
10 changes: 10 additions & 0 deletions docs/src/main/sphinx/sql/match-recognize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ It is a sequence of components separated by ``|``. Exactly one of the
components is matched. In case when multiple components can be matched, the
leftmost matching component is chosen.

.. _permute-function:

permutation
^^^^^^^^^^^

Expand Down Expand Up @@ -488,6 +490,8 @@ all rows of the current match.
It is forbidden to prefix a column name with a table name in the pattern
recognition context.

.. _classifier-function:

classifier function
^^^^^^^^^^^^^^^^^^^

Expand All @@ -506,6 +510,8 @@ column references. The ``classifier`` function is particularly useful with a
union variable as the argument. It allows you to determine which variable from
the subset actually matched.

.. _match-number-function:

match_number function
^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -517,6 +523,8 @@ The ``match_number`` function returns the sequential number of the match within
partition, starting from ``1``. Empty matches are assigned sequential numbers
as well as non-empty matches. The return type is ``bigint``.

.. _logical-navigation-functions:

logical navigation functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -545,6 +553,8 @@ The second argument is optional. The default value is ``0``, which means that
by default these functions navigate to the first or last row of interest. If
specified, the second argument must be a non-negative integer number.

.. _physical-navigation-functions:

physical navigation functions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 3d708d4

Please sign in to comment.