Apache Hive : HPL/SQL - Addition Operator (+)

Last updated: August 12, 2026

Apache Hive : HPL/SQL - Addition Operator (+)

You can use + arithmetic operator to add two numbers, concatenate two strings, or add an interval to a DATE value.

Syntax:

expr + expr

Add Two Integers

When you add two integer values the result of the operation also has an integer value.

Example:

ExpressionResultResult Type
3 + 14Integer

Concatenate Two Strings

When you use + for string operand the result of the operation is the concatenated string.

Example:

ExpressionResultResult Type
‘Ab’ + ‘c’‘Abc’String

Add an Integer to Date

When you add an integer to a DATE value, HPL/SQL adds the number of days to the DATE and the result of the operation is a DATE value.

Example:

ExpressionResultResult Type
DATE ‘2014-12-31’ + 1DATE ‘2015-01-01’DATE