From 3d708d4298f410c18fce758a3a2146c7610fbe59 Mon Sep 17 00:00:00 2001 From: Boris Verkhovskiy Date: Mon, 10 Jul 2023 14:25:29 +0100 Subject: [PATCH] Add row pattern recognition functions to list of functions --- docs/src/main/sphinx/functions/list-by-topic.rst | 11 +++++++++++ docs/src/main/sphinx/functions/list.rst | 7 +++++++ docs/src/main/sphinx/sql/match-recognize.rst | 10 ++++++++++ 3 files changed, 28 insertions(+) diff --git a/docs/src/main/sphinx/functions/list-by-topic.rst b/docs/src/main/sphinx/functions/list-by-topic.rst index 74473c985b66..2ea9659e8db5 100644 --- a/docs/src/main/sphinx/functions/list-by-topic.rst +++ b/docs/src/main/sphinx/functions/list-by-topic.rst @@ -446,6 +446,17 @@ For more details, see :doc:`regexp` * :func:`regexp_replace` * :func:`regexp_split` +Row pattern recognition expressions +----------------------------------- + +* :ref:`classifier ` +* :ref:`first ` +* :ref:`last ` +* :ref:`match_number ` +* :ref:`next ` +* :ref:`permute ` +* :ref:`prev ` + Session ------- diff --git a/docs/src/main/sphinx/functions/list.rst b/docs/src/main/sphinx/functions/list.rst index 7a8f0b7bf7e2..f54a444b1cb6 100644 --- a/docs/src/main/sphinx/functions/list.rst +++ b/docs/src/main/sphinx/functions/list.rst @@ -95,6 +95,7 @@ C - :func:`checksum` - :func:`chr` - :func:`classify` +- :ref:`classifier ` - :ref:`coalesce ` - :func:`codepoint` - :func:`color` @@ -157,6 +158,7 @@ F - :func:`features` - :func:`filter` +- :ref:`first ` - :func:`first_value` - :func:`flatten` - :func:`floor` @@ -252,6 +254,7 @@ L - - :func:`lag` +- :ref:`last ` - :func:`last_day_of_month` - :func:`last_value` - :func:`lead` @@ -291,6 +294,7 @@ M - :func:`map_union` - :func:`map_values` - :func:`map_zip_with` +- :ref:`match_number ` - :func:`max` - :func:`max_by` - :func:`md5` @@ -310,6 +314,7 @@ N - - :func:`nan` +- :ref:`next ` - :func:`ngrams` - :func:`none_match` - :func:`normal_cdf` @@ -336,10 +341,12 @@ P - :func:`parse_duration` - :func:`parse_data_size` - :func:`percent_rank` +- :ref:`permute ` - :func:`pi` - :func:`position` - :func:`pow` - :func:`power` +- :ref:`prev ` Q - diff --git a/docs/src/main/sphinx/sql/match-recognize.rst b/docs/src/main/sphinx/sql/match-recognize.rst index 7cc0480a4186..2776784abc38 100644 --- a/docs/src/main/sphinx/sql/match-recognize.rst +++ b/docs/src/main/sphinx/sql/match-recognize.rst @@ -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 ^^^^^^^^^^^ @@ -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 ^^^^^^^^^^^^^^^^^^^ @@ -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 ^^^^^^^^^^^^^^^^^^^^^ @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^