Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add row pattern recognition functions to list of functions #13327

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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