Skip to content

Commit c52270b

Browse files
authored
Fix ListFromRange signatures in docs (#10014)
1 parent bd699d4 commit c52270b

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

+10
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,13 @@ Specifics:
516516

517517
* The end is not included, i.e. `ListFromRange(1,3) == AsList(1,2)`.
518518
* 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.
519+
* If the start and the end is one of the date representing type, the step has to be `Interval`.
519520
* The list is "lazy", but if it's used incorrectly, it can still consume a lot of RAM.
520521
* If the step is positive and the end is less than or equal to the start, the result list is empty.
521522
* If the step is negative and the end is greater than or equal to the start, the result list is empty.
522523
* If the step is neither positive nor negative (0 or NaN), the result list is empty.
524+
* If any of the parameters is optional, the result list is optional.
525+
* If any of the parameters is `NULL`, the result is `NULL`.
523526

524527
### Examples
525528

@@ -529,6 +532,13 @@ SELECT
529532
ListFromRange(2, 1, -0.5); -- [2.0, 1.5]
530533
```
531534

535+
### Signature
536+
537+
```yql
538+
ListFromRange(T{Flags:AutoMap}, T{Flags:AutoMap}, T?)->LazyList<T> -- T — numeric type
539+
ListFromRange(T{Flags:AutoMap}, T{Flags:AutoMap}, I?)->LazyList<T> -- T — type, representing date/time, I — interval
540+
```
541+
532542
## ListReplicate {#listreplicate}
533543

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

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,8 @@ SELECT ListFromRange(Datetime("2022-05-23T15:30:00Z"), Datetime("2022-05-30T15:3
799799
### Сигнатура
800800

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

805806
## ListReplicate {#listreplicate}

0 commit comments

Comments
 (0)