Update plain functions for 3.8

Deprecated or Unsupported 3.7 Functions

Replace with 3.8 Function

concat(String column-or-literal, String column-or-literal)

Use the || operator

"date"(String column)

"date"(String column, String format)

to_date

"day"(Date column)

"day"(String column)

"day"(Long column)

extract_day

decimal(Double column) (Unsupported Function)

decimal(Long column)

decimal(String column)

cast(column as datatype)

"hour"(Date column)

"hour"(String column)

"hour"(Long column)

extract_hour

length(String column) (Unsupported Function)

char_length or character_length

"minute"(Date column)

"minute"(String column)

"minute"(Long column)

extract_minute

"month"(Date column)

"month"(String column)

"month"(Long column)

"month"(Object column)

extract_month

number(String column) (Unsupported Function)

cast(column as datatype)

round(Object column)

This function no longer accepts objects and implicitly casts them to numeric values.

Mashups that relied on this implicit casting must update queries to use the following:

round(CAST(Object column AS double))

If no number of decimal places is specified, this function now rounds to zero decimals which may also affect mashup results. Mashups that require two decimal places must update queries to use the following:

round(Number column, "2")

"second"(Date column)

"second"(String column)

"second"(Long column)

extract_second

"string"(String column)

cast(column as datatype)

substr(String column, Integer begin, Integer end)

substring(String column, Integer start-position, Integer length

Note: This is not a simple substitution as the semantics of the parameters that identify the characters to extract have different meanings in these functions.

In addition to different parameters, character positions in substr use zero-based indexes while substring uses 1-based indexes.

to_long(String column)

cast(column as datatype)

"week"(Date column)

"week"(String column)

"week"(Long column)

extract_week

"year"(Date column)

"year"(String column)

"year"(Long column)

"year"(Object column)

extract_year