Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r097

D toc

Excerpt

Computes the maximum of all numeric values found in input array. Input can be an array literal, a column of arrays, or a function returning an array. Input values must be of Integer or Decimal type.

When this function is invoked, all of the values in the input array are passed to the corresponding columnar function. Some restrictions may apply. See MAX Function.

D s lang vs sql

D s
snippetBasic

Literal example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:listmax([0,0,2,4,6,8,10,12,14,16,18,20]) as:'myArrayMax'

listmax([0,0,2,4,6,8,10,12,14,16,18,20])

Output: Returns the maximum of all values in the literal array: 20.

Column example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:listmax(myArray) as:'myArrayMax'

listmax(myArray)

Output: Generates an output column containing the maximum of all values in the arrays of the myArray column.

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:listmax(array_ref)

listmax(array_ref)


ArgumentRequired?Data TypeDescription
array_refYArrayArray literal, reference to column containing arrays, or function returning an array

D s lang notes

array_ref

Reference to an array can be an array literal, function returning an array, or a single column containing arrays.

  • If the input is not a valid numeric array, null values are returned.
  • Non-numerical values within an input array are not factored in the computation.
  • Multiple columns and wildcards are not supported.

D s
snippetusage

Required?Data TypeExample Value
Yes

Array

myArray

D s
snippetExamples

Example - Math functions for lists (arrays)

Include Page
EXAMPLE - LIST Math Functions
EXAMPLE - LIST Math Functions

D s also
labelnested