नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
Returns a table of values within a specified range.
Syntax
range(end)
range(start, end [, step [, numParts] ] )
Arguments
start: An optionalBIGINTliteral defaulted to 0, marking the first value generated.end: ABIGINTliteral marking endpoint (exclusive) of the number generation.step: An optionalBIGINTliteral defaulted to 1, specifying the increment used when generating values.numParts: An optionalINTEGERliteral specifying how the production of rows is spread across partitions.
Returns
A table with a single BIGINT column named id.
Examples
> SELECT spark_partition_id(), t.* FROM range(5) AS t;
3 0
6 1
9 2
12 3
15 4
> SELECT * FROM range(-3, 0);
-3
-2
-1
> SELECT spark_partition_id(), t.* FROM range(0, -5, -1, 2) AS t;
0 0
0 -1
1 -2
1 -3
1 -4