You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "James Turton (Jira)" <ji...@apache.org> on 2023/02/08 08:40:00 UTC
[jira] [Closed] (DRILL-8354) Add IS_EMPTY Function.
[ https://issues.apache.org/jira/browse/DRILL-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Turton closed DRILL-8354.
-------------------------------
Resolution: Fixed
> Add IS_EMPTY Function.
> ----------------------
>
> Key: DRILL-8354
> URL: https://issues.apache.org/jira/browse/DRILL-8354
> Project: Apache Drill
> Issue Type: Improvement
> Components: Functions - Drill
> Affects Versions: 1.20.2
> Reporter: Charles Givre
> Assignee: Charles Givre
> Priority: Major
> Fix For: 1.21.0
>
>
> When analyzing data, there is currently no single function to evaluate whether a given field is empty. With scalar fields, this can be accomplished with the `IS NOT NULL` operator, but with complex fields, this is more challenging as complex fields are never null.
> This PR adds a UDF called IS_EMPTY() which accepts any type of field and returns true if the field does not contain data.
>
> In the case of scalar fields, if the field is `null` this returns true. In the case of complex fields, which can never be `null`, in the case of lists, the function returns true if the list is empty. In the case of maps, it returns true if all of the map's fields are unpopulated.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)