|| (pipe pipe sign) operator

Returns the concatenation of expr1 and expr2.

Syntax

expr1 || expr2

Arguments

  • expr1: A STRING, BINARY or ARRAY of STRING or BINARY expression.

  • expr2: An expression with type matching expr1.

Returns

The result type matches the argument types.

This operator is a synonym for concat function

Examples

> SELECT 'Spark' || 'SQL';
 SparkSQL
> SELECT array(1, 2, 3) || array(4, 5) || array(6);
 [1,2,3,4,5,6]