Why does SPLIT_PART function in TIBCO Data Virtualization not return a null when there is no match ?

Why does SPLIT_PART function in TIBCO Data Virtualization not return a null when there is no match ?

book

Article ID: KB0071034

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization TIBCO Data Virtualization 8.4.1 and above

Description

The new behavior of the SPLIT_PART function in TDV is as follows:

An empty string is returned if the position does not have any valid string. This behavior is consistent with the behavior of the SPLIT_PART function in Postgres and MySQL.

Example:

To illustrate the change in behavior, consider the following examples:

In versions 8.3 and below:

Calling SPLIT_PART('1234Acme_parts', ',', 2) => return NULL.

In versions 8.4.1 and above:

Calling SPLIT_PART('1234Acme_parts', ',', 2) => return an empty string.

This change aligns the SPLIT_PART function in TDV with the behavior of similar functions in popular database systems like Postgres and MySQL.

Issue/Introduction

This article provides details of a design change in the behavior of the SPLIT_PART function on TDV 8.4 and later versions

Environment

All supported environments

Resolution

The change in the behavior of the SPLIT_PART function is a conscious design enhancement made to mimic the Postgres and MySQL behavior for the same function.