SLICE (Lakehouse v1)
Extracts a slice from the array by index (1-based).
Analyze Syntax
Section titled “Analyze Syntax”func.slice( <array>, <start>[, <end>] )Analyze Examples
Section titled “Analyze Examples”func.slice([1, 21, 32, 4], 2, 3)
┌──────────────────────────────────┐│ func.slice([1, 21, 32, 4], 2, 3) │├──────────────────────────────────┤│ [21,32] │└──────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”SLICE( <array>, <start>[, <end>] )Aliases
Section titled “Aliases”SQL Examples
Section titled “SQL Examples”SELECT ARRAY_SLICE([1, 21, 32, 4], 2, 3), SLICE([1, 21, 32, 4], 2, 3);
┌─────────────────────────────────────────────────────────────────┐│ array_slice([1, 21, 32, 4], 2, 3) │ slice([1, 21, 32, 4], 2, 3) │├───────────────────────────────────┼─────────────────────────────┤│ [21,32] │ [21,32] │└─────────────────────────────────────────────────────────────────┘