Apache Drill - REPEATED CONTAINS Function



Searches for a keyword in an array. If the keyword is present in an array, the result will be true otherwise false.

Syntax

REPEATED_CONTAINS(array_name, keyword)

The array_name is a simple array. The following program shows the query for this function −

Query

0: jdbc:drill:zk = local> select REPEATED_CONTAINS(num2,10) from
   dfs.`/Users/../workspace/Drill-samples/array.json`;

Result

true

Query

0: jdbc:drill:zk = local> select REPEATED_CONTAINS(num2,40) from
   dfs.`/Users/deiva/workspace/Drill-samples/array.json`;

Result

false
apache_drill_querying_complex_data.htm
Advertisements