TableValuedFunction

org.apache.spark.sql.TableValuedFunction

Table-valued functions, available as spark.tvf: each returns a DataFrame built from a server-side table-valued function. Mirrors org.apache.spark.sql.TableValuedFunction.

 spark.tvf.explode(array(lit(1), lit(2))).show()
 spark.tvf.range(5)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

The collations supported by the server.

The collations supported by the server.

Attributes

def explode(collection: Column): DataFrame

A row per element of the given array or map.

A row per element of the given array or map.

Attributes

def explode_outer(collection: Column): DataFrame

Like explode, but produces a row of nulls for a null or empty collection.

Like explode, but produces a row of nulls for a null or empty collection.

Attributes

def inline(input: Column): DataFrame

A row per struct of the given array of structs.

A row per struct of the given array of structs.

Attributes

Like inline, but produces a row of nulls for a null or empty array.

Like inline, but produces a row of nulls for a null or empty array.

Attributes

def json_tuple(input: Column, fields: Column*): DataFrame

A row of the given JSON fields extracted from the JSON string input.

A row of the given JSON fields extracted from the JSON string input.

Attributes

def posexplode(collection: Column): DataFrame

A row per element of the given array or map, with its position.

A row per element of the given array or map, with its position.

Attributes

def posexplode_outer(collection: Column): DataFrame

Like posexplode, but produces a row of nulls for a null or empty collection.

Like posexplode, but produces a row of nulls for a null or empty collection.

Attributes

The logs of the server's Python workers (Spark 4.1+).

The logs of the server's Python workers (Spark 4.1+).

Attributes

def range(end: Long): Dataset[Long]

A Dataset with a single id column of [0, end).

A Dataset with a single id column of [0, end).

Attributes

def range(start: Long, end: Long): Dataset[Long]

A Dataset with a single id column of [start, end).

A Dataset with a single id column of [start, end).

Attributes

def range(start: Long, end: Long, step: Long): Dataset[Long]

A Dataset with a single id column of [start, end) stepping by step.

A Dataset with a single id column of [start, end) stepping by step.

Attributes

def range(start: Long, end: Long, step: Long, numPartitions: Int): Dataset[Long]

A Dataset with a single id column of [start, end) in numPartitions partitions.

A Dataset with a single id column of [start, end) in numPartitions partitions.

Attributes

The SQL keywords of the server.

The SQL keywords of the server.

Attributes

def stack(n: Column, fields: Column*): DataFrame

Separates fields into n rows.

Separates fields into n rows.

Attributes

A row per element of the given variant array or object.

A row per element of the given variant array or object.

Attributes

Like variant_explode, but produces a row of nulls for a non-collection variant.

Like variant_explode, but produces a row of nulls for a non-collection variant.

Attributes