summaryrefslogtreecommitdiffstats
path: root/yql/essentials/docs/en/syntax
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2025-02-26 19:56:03 +0300
committerrobot-piglet <[email protected]>2025-02-26 20:08:35 +0300
commitf9a1896b7299c05b3275949378e221e044872d6f (patch)
tree6953ef34b963d665a2130771efa7e5d9dcb785ec /yql/essentials/docs/en/syntax
parent5a3aa70af58a490cada682b229eef368bd42340c (diff)
Intermediate changes
commit_hash:17a903d36007950139a4f3a7676d0c6190090981
Diffstat (limited to 'yql/essentials/docs/en/syntax')
-rw-r--r--yql/essentials/docs/en/syntax/action.md12
-rw-r--r--yql/essentials/docs/en/syntax/export_import.md2
-rw-r--r--yql/essentials/docs/en/syntax/expressions.md24
-rw-r--r--yql/essentials/docs/en/syntax/flatten.md8
-rw-r--r--yql/essentials/docs/en/syntax/group_by.md16
-rw-r--r--yql/essentials/docs/en/syntax/join.md2
-rw-r--r--yql/essentials/docs/en/syntax/pragma.md4
-rw-r--r--yql/essentials/docs/en/syntax/select/concat.md2
-rw-r--r--yql/essentials/docs/en/syntax/select/from.md2
-rw-r--r--yql/essentials/docs/en/syntax/select/from_as_table.md2
-rw-r--r--yql/essentials/docs/en/syntax/select/from_select.md2
-rw-r--r--yql/essentials/docs/en/syntax/select/union.md4
-rw-r--r--yql/essentials/docs/en/syntax/subquery.md8
-rw-r--r--yql/essentials/docs/en/syntax/values.md2
14 files changed, 45 insertions, 45 deletions
diff --git a/yql/essentials/docs/en/syntax/action.md b/yql/essentials/docs/en/syntax/action.md
index 6ec0f0f71f3..ec6b785279b 100644
--- a/yql/essentials/docs/en/syntax/action.md
+++ b/yql/essentials/docs/en/syntax/action.md
@@ -4,7 +4,7 @@
Specifies a named action that is a parameterizable block of multiple top-level expressions.
-### Syntax
+#### Syntax
1. `DEFINE ACTION`: action definition.
1. [Action name](expressions.md#named-nodes) that will be used to access the defined action further in the query.
@@ -19,7 +19,7 @@ One or more of the last parameters can be marked with a question mark `?` as opt
Executes an `ACTION` with the specified parameters.
-### Syntax
+#### Syntax
1. `DO`: Executing an action.
1. The named expression for which the action is defined.
@@ -33,7 +33,7 @@ In large queries, you can use separate files for action definition and include t
{% endnote %}
-### Example
+#### Example
```yql
DEFINE ACTION $hello_world($name, $suffix?) AS
@@ -51,7 +51,7 @@ DO $hello_world(NULL, "Earth");
Performing an action without declaring it (anonymous action).
-### Syntax
+#### Syntax
1. `BEGIN`.
1. List of top-level expressions.
@@ -59,7 +59,7 @@ Performing an action without declaring it (anonymous action).
An anonymous action can't include any parameters.
-### Example
+#### Example
```yql
DO BEGIN
@@ -86,7 +86,7 @@ END DO
4. [DO](#do) with the name and parameters of an action or an anonymous action. In the parameters, you can use both the current element from the first paragraph and any named expressions declared above, including the list itself.
5. An optional `ELSE` followed by the second `DO` for the situation when the list is empty.
-### Examples
+#### Examples
```yql
DEFINE ACTION $hello() AS
diff --git a/yql/essentials/docs/en/syntax/export_import.md b/yql/essentials/docs/en/syntax/export_import.md
index ddebe256bee..15fd0714a41 100644
--- a/yql/essentials/docs/en/syntax/export_import.md
+++ b/yql/essentials/docs/en/syntax/export_import.md
@@ -24,7 +24,7 @@ The file linked by the [PRAGMA Library](pragma.md#library) must be attached to t
{% endnote %}
-### Examples
+#### Examples
my_lib.sql:
diff --git a/yql/essentials/docs/en/syntax/expressions.md b/yql/essentials/docs/en/syntax/expressions.md
index 02ba8372dde..7d6ceceb9fd 100644
--- a/yql/essentials/docs/en/syntax/expressions.md
+++ b/yql/essentials/docs/en/syntax/expressions.md
@@ -10,7 +10,7 @@ As with other binary operators, if the data on either side is `NULL`, the result
Don't confuse this operator with a logical "or": in SQL, it's denoted by the `OR` keyword. It's also not worth doing concatenation using `+`.
-### Examples
+#### Examples
```yql
SELECT "fo" || "o";
@@ -38,7 +38,7 @@ All other characters are literals that represent themselves.
The most popular way to use the `LIKE` and `REGEXP` keywords is to filter a table using the statements with the `WHERE` clause. However, there are no restrictions on using templates in this context: you can use them in most of contexts involving strings, for example, with concatenation by using `||`.
-### Examples
+#### Examples
```yql
SELECT * FROM my_table
@@ -161,7 +161,7 @@ The operators in the table are listed in descending order of precedence.
Matching an empty value (`NULL`). Since `NULL` is a special value [equal to nothing](../types/optional.md#null_expr), the ordinary [comparison operators](#comparison-operators) can't be used to match it.
-### Examples
+#### Examples
```yql
SELECT key FROM my_table
@@ -188,7 +188,7 @@ For values of composite types, these rules are used recursively.
Checking whether a value is in a range. It's equivalent to two conditions with `>=` and `<=` (range boundaries are included). Can be used with the `NOT` prefix to support inversion.
-### Examples
+#### Examples
```yql
SELECT * FROM my_table
@@ -215,7 +215,7 @@ The `COMPACT` modifier must be used with care. Since the hash table is built in-
It is prefirable to add large lists of values to your query by URLs and use the [ParseFile](../builtins/basic.md#parsefile) function.
-### Examples
+#### Examples
```yql
SELECT column IN (1, 2, 3)
@@ -251,7 +251,7 @@ Can be used in the following scenarios:
* Using named arguments in function calls.
* To specify the target type in the case of explicit type casting, see [CAST](#cast).
-### Examples
+#### Examples
```yql
SELECT key AS k FROM my_table;
@@ -278,7 +278,7 @@ For more information about casting rules, see [here](../types/cast.md).
{% include [decimal_args](../_includes/decimal_args.md) %}
-### Examples
+#### Examples
{% include [cast_examples](../_includes/cast_examples.md) %}
@@ -287,7 +287,7 @@ For more information about casting rules, see [here](../types/cast.md).
Performs a bitwise conversion of an integer value to the specified integer type. The conversion is always successful, but may lose precision or high-order bits.
-### Examples
+#### Examples
```yql
SELECT
@@ -306,7 +306,7 @@ The `ELSE` branch is mandatory in the `CASE` expression. Expressions in `WHEN` a
Since its syntax is quite sophisticated, it's often more convenient to use the built-in function [IF](../builtins/basic.md#if).
-### Examples
+#### Examples
```yql
SELECT
@@ -384,7 +384,7 @@ If named expression substitution results in completely identical subgraphs in th
{% endnote %}
-### Examples
+#### Examples
```yql
$multiplier = 712;
@@ -496,7 +496,7 @@ Only use pure expressions inside the lambda body (those might also be other lamb
One or more of the last lambda parameters can be marked with a question mark as optional: if they haven't been specified when calling lambda, they are assigned the `NULL` value.
-### Examples
+#### Examples
```yql
$f = ($y) -> {
@@ -530,7 +530,7 @@ For accessing the values inside containers:
When using this syntax to access containers within table columns, be sure to specify the full column name, including the table name or table alias separated by a dot (see the first example below).
-### Examples
+#### Examples
```yql
SELECT
diff --git a/yql/essentials/docs/en/syntax/flatten.md b/yql/essentials/docs/en/syntax/flatten.md
index b99f59ef49d..f6978fa41d0 100644
--- a/yql/essentials/docs/en/syntax/flatten.md
+++ b/yql/essentials/docs/en/syntax/flatten.md
@@ -22,7 +22,7 @@ For example:
|d|2|
-### Example
+#### Example
```yql
$sample = AsList(
@@ -40,7 +40,7 @@ This conversion can be convenient in the following cases:
* When the cells in a container column store IDs from another table that you want to join with [`JOIN`](join.md).
-### Syntax
+#### Syntax
* `FLATTEN BY` is specified after `FROM`, but before `GROUP BY`, if `GROUP BY` is present in the query.
* The type of the result column depends on the type of the source column:
@@ -83,7 +83,7 @@ To specify the type of container to convert to, you can use:
To filter the `NULL` values without serialization, specify the operation by using `FLATTEN OPTIONAL BY`.
-### Examples
+#### Examples
```yql
SELECT
@@ -129,7 +129,7 @@ Converts a table where all columns must be structures to a table with columns co
The names of the source column structures are not used and not returned in the result. Be sure that the structure element names aren't repeated in the source columns.
-### Example
+#### Example
```yql
SELECT x, y, z
diff --git a/yql/essentials/docs/en/syntax/group_by.md b/yql/essentials/docs/en/syntax/group_by.md
index 5740cc63808..794c866a2f4 100644
--- a/yql/essentials/docs/en/syntax/group_by.md
+++ b/yql/essentials/docs/en/syntax/group_by.md
@@ -2,7 +2,7 @@
Group the `SELECT` results by the values of the specified columns or expressions. `GROUP BY` is often combined with [aggregate functions](../builtins/aggregation.md) (`COUNT`, `MAX`, `MIN`, `SUM`, `AVG`) to perform calculations in each group.
-### Syntax
+#### Syntax
```yql
SELECT -- In SELECT, you can use:
@@ -31,7 +31,7 @@ Aggregate functions ignore `NULL` in their arguments, except for `COUNT`.
YQL also provides aggregation factories implemented by the functions [`AGGREGATION_FACTORY`](../builtins/basic.md#aggregationfactory) and [`AGGREGATE_BY`](../builtins/aggregation.md#aggregateby).
-### Examples
+#### Examples
```yql
SELECT key, COUNT(*) FROM my_table
@@ -111,7 +111,7 @@ Where:
Using the extended version of SessionWindow, you can, for example, do the following: divide a partition into sessions, as in the SessionWindow use case with two arguments, but with the maximum session length limited by a certain constant:
-### Example
+#### Example
```yql
$max_len = 1000; -- is the maximum session length.
@@ -140,7 +140,7 @@ You can use `SessionWindow` in `GROUP BY` only once.
The results of calculating the aggregate function as subtotals for the groups and overall totals over individual columns or whole table.
-### Syntax
+#### Syntax
```yql
SELECT
@@ -169,7 +169,7 @@ The values of columns not used in calculations are replaced with `NULL` in the s
* `0`: If `NULL` is used for the original empty value.
* `1`: If `NULL` is added for a subtotal or overall total.
-### Example
+#### Example
```yql
SELECT
@@ -220,7 +220,7 @@ Applying `DISTINCT` to calculated values is not currently implemented. For this
{% endnote %}
-### Example
+#### Example
```yql
SELECT
@@ -240,7 +240,7 @@ Improves aggregation efficiency if the query author knows in advance that none o
Unlike the usual GROUP BY, the Map-side combiner stage and additional Reduce are disabled for each field with [DISTINCT](../syntax/group_by.md#distinct) aggregation.
-### Example
+#### Example
```yql
SELECT
@@ -256,7 +256,7 @@ LIMIT 3;
Filtering a `SELECT` based on the calculation results of [aggregate functions](../builtins/aggregation.md). The syntax is similar to [WHERE](select/where.md).
-### Example
+#### Example
```yql
SELECT
diff --git a/yql/essentials/docs/en/syntax/join.md b/yql/essentials/docs/en/syntax/join.md
index 14ec1ce566e..08367ff61bf 100644
--- a/yql/essentials/docs/en/syntax/join.md
+++ b/yql/essentials/docs/en/syntax/join.md
@@ -55,7 +55,7 @@ For any other JOIN types, specify the condition using one of the two methods:
1. `USING (column_name)`. Used if both the left and right subqueries share a column whose equality of values is a join condition.
2. `ON (equality_conditions)`. Lets you set a condition of equality for column values or expressions over columns in the left and right subqueries or use several such conditions combined by `and`.
-### Examples
+#### Examples
```yql
SELECT a.value as a_value, b.value as b_value
diff --git a/yql/essentials/docs/en/syntax/pragma.md b/yql/essentials/docs/en/syntax/pragma.md
index afbfe502271..5bb89c276ec 100644
--- a/yql/essentials/docs/en/syntax/pragma.md
+++ b/yql/essentials/docs/en/syntax/pragma.md
@@ -4,7 +4,7 @@
Redefinition of settings.
-### Syntax
+#### Syntax
`PRAGMA x.y = "z";` or `PRAGMA x.y("z", "z2", "z3");`:
@@ -15,7 +15,7 @@ Redefinition of settings.
* `Kb`, `Mb`, `Gb`: For the data amounts.
* `sec`, `min`, `h`, `d`: For the time values.
-### Examples
+#### Examples
```yql
PRAGMA AutoCommit;
diff --git a/yql/essentials/docs/en/syntax/select/concat.md b/yql/essentials/docs/en/syntax/select/concat.md
index e1170e72878..3a6733d620d 100644
--- a/yql/essentials/docs/en/syntax/select/concat.md
+++ b/yql/essentials/docs/en/syntax/select/concat.md
@@ -24,7 +24,7 @@ All arguments of the functions described above can be declared separately using
To get the name of the source table from which you originally obtained each row, use [TablePath()](../../builtins/basic.md#tablepath).
-### Examples
+#### Examples
```yql
USE some_cluster;
diff --git a/yql/essentials/docs/en/syntax/select/from.md b/yql/essentials/docs/en/syntax/select/from.md
index 924790d9def..67d5ef887af 100644
--- a/yql/essentials/docs/en/syntax/select/from.md
+++ b/yql/essentials/docs/en/syntax/select/from.md
@@ -4,7 +4,7 @@ Data source for `SELECT`. The argument can accept the table name, the result of
The table is searched by name in the database specified by the operator [USE](../use.md).
-### Examples
+#### Examples
```yql
SELECT key FROM my_table;
diff --git a/yql/essentials/docs/en/syntax/select/from_as_table.md b/yql/essentials/docs/en/syntax/select/from_as_table.md
index 459cd51b04b..bec8ae15090 100644
--- a/yql/essentials/docs/en/syntax/select/from_as_table.md
+++ b/yql/essentials/docs/en/syntax/select/from_as_table.md
@@ -4,7 +4,7 @@ Accessing named expressions as tables using the `AS_TABLE` function.
`AS_TABLE($variable)` lets you use the value of `$variable` as the data source for the query. In this case, the variable `$variable` must have the type `List<Struct<...>>`.
-### Example
+#### Example
```yql
$data = AsList(
diff --git a/yql/essentials/docs/en/syntax/select/from_select.md b/yql/essentials/docs/en/syntax/select/from_select.md
index 76373ca2510..b9ec8d8ced2 100644
--- a/yql/essentials/docs/en/syntax/select/from_select.md
+++ b/yql/essentials/docs/en/syntax/select/from_select.md
@@ -2,7 +2,7 @@
An inverted format, first specifying the data source and then the operation.
-### Examples
+#### Examples
```yql
FROM my_table SELECT key, value;
diff --git a/yql/essentials/docs/en/syntax/select/union.md b/yql/essentials/docs/en/syntax/select/union.md
index 32b5ee18759..4b6097dc301 100644
--- a/yql/essentials/docs/en/syntax/select/union.md
+++ b/yql/essentials/docs/en/syntax/select/union.md
@@ -6,7 +6,7 @@ Union of the results of the underlying queries, with duplicates removed.
Behavior is identical to using `UNION ALL` followed by `SELECT DISTINCT *`.
Refer to [UNION ALL](#union-all) for more details.
-### Examples
+#### Examples
```yql
SELECT key FROM T1
@@ -41,7 +41,7 @@ In the "by position" mode, the output of the resulting data schema uses the foll
The order of the output columns in this mode is the same as the order of columns in the first input.
-### Examples
+#### Examples
```yql
SELECT 1 AS x
diff --git a/yql/essentials/docs/en/syntax/subquery.md b/yql/essentials/docs/en/syntax/subquery.md
index 10767ed07d3..c1d1c5ebec0 100644
--- a/yql/essentials/docs/en/syntax/subquery.md
+++ b/yql/essentials/docs/en/syntax/subquery.md
@@ -32,7 +32,7 @@ $out1, $out2 = PROCESS $mySubquery($myParam1, $myParam2);
-- next we use $out1 and $out2 as separate tables.
```
-### Examples
+#### Examples
```yql
DEFINE SUBQUERY $hello_world($name, $suffix?) AS
@@ -128,7 +128,7 @@ These functions combine the results of one or more subquery templates passed by
* `SubqueryMerge` uses the same constraints as `SubqueryExtend` and also outputs a sorted result if all subqueries have the same sort order.
* `SubqueryUnionMerge` uses the same constraints as `SubqueryUnionAll` and also outputs a sorted result if all subqueries have the same sort order.
-### Examples
+#### Examples
```yql
DEFINE SUBQUERY $sub1() as
@@ -157,7 +157,7 @@ They substitute each item from the list into the subquery template as a paramete
* `SubqueryMergeFor` uses the same constraints as `SubqueryExtendFor` and also outputs a sorted result if all subqueries have the same sort order.
* `SubqueryUnionMergeFor` uses the same constraints as `SubqueryUnionAllFor` and also outputs a sorted result if all subqueries have the same sort order.
-### Examples
+#### Examples
```yql
DEFINE SUBQUERY $sub($i) as
@@ -177,7 +177,7 @@ The functions take the following arguments:
And they build a new query template without parameters where sorting is performed or a comment on the use of sorting is added to the result. To use the resulting query template, call the `PROCESS` function, since, when using a `SELECT`, sorting is ignored.
-### Examples
+#### Examples
```yql
DEFINE SUBQUERY $sub() as
diff --git a/yql/essentials/docs/en/syntax/values.md b/yql/essentials/docs/en/syntax/values.md
index c39805312cc..1482c843c97 100644
--- a/yql/essentials/docs/en/syntax/values.md
+++ b/yql/essentials/docs/en/syntax/values.md
@@ -20,7 +20,7 @@ SELECT expr_21, expr_22, ..., expr_2k UNION ALL
SELECT expr_n1, expr_n2, ..., expr_nk;
```
-### Example
+#### Example
```yql
VALUES (1,2), (3,4);