Skip to content

Commit 7c6fe18

Browse files
committed
Fix ListFromRange signatures in docs
The reference for <ListFromRange> builtin is missing the signature for parameters being optional YQL type. This specialization is worth mentioning since in that case the optional type is propagated further to the <ListFromRange> resulting type.
1 parent f1bf216 commit 7c6fe18

File tree

2 files changed

+12
-1
lines changed
  • ydb/docs
    • en/core/yql/reference/yql-core/builtins/_includes
    • ru/core/yql/reference/yql-core/builtins/_includes

2 files changed

+12
-1
lines changed

ydb/docs/en/core/yql/reference/yql-core/builtins/_includes/list.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,10 +470,13 @@ Specifics:
470470

471471
* The end is not included, i.e. `ListFromRange(1,3) == AsList(1,2)`.
472472
* The type for the resulting elements is selected as the broadest from the argument types. For example, `ListFromRange(1, 2, 0.5)` results in a `Double` list.
473+
* If the start and the end is one of the date representing type, the step has to be `Interval`.
473474
* The list is "lazy", but if it's used incorrectly, it can still consume a lot of RAM.
474475
* If the step is positive and the end is less than or equal to the start, the result list is empty.
475476
* If the step is negative and the end is greater than or equal to the start, the result list is empty.
476477
* If the step is neither positive nor negative (0 or NaN), the result list is empty.
478+
* If any of the parameters is optional, the result list is optional.
479+
* If any of the parameters is `NULL`, the result is `NULL`.
477480

478481
### Examples
479482

@@ -483,6 +486,13 @@ SELECT
483486
ListFromRange(2, 1, -0.5); -- [2.0, 1.5]
484487
```
485488

489+
### Signature
490+
491+
```yql
492+
ListFromRange(T{Flags:AutoMap}, T{Flags:AutoMap}, T?)->LazyList<T> -- T — numeric type
493+
ListFromRange(T{Flags:AutoMap}, T{Flags:AutoMap}, I?)->LazyList<T> -- T — type, representing date/time, I — interval
494+
```
495+
486496
## ListReplicate {#listreplicate}
487497

488498
Creates a list containing multiple copies of the specified value.

ydb/docs/ru/core/yql/reference/yql-core/builtins/_includes/list.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,8 @@ SELECT ListFromRange(Datetime("2022-05-23T15:30:00Z"), Datetime("2022-05-30T15:3
749749
### Сигнатура
750750

751751
```yql
752-
ListFromRange(T, T)->LazyList<T> -- T - числовой тип или тип, представляющий дату/время
752+
ListFromRange(T{Flags:AutoMap}, T{Flags:AutoMap}, T?)->LazyList<T> -- T — числовой тип
753+
ListFromRange(T{Flags:AutoMap}, T{Flags:AutoMap}, I?)->LazyList<T> -- T — тип, представляющий дату/время, I — интервал
753754
```
754755

755756
## ListReplicate {#listreplicate}

0 commit comments

Comments
 (0)