Hadoop 筛选配置单元复杂数据类型

Hadoop 筛选配置单元复杂数据类型,hadoop,hive,hiveql,Hadoop,Hive,Hiveql,我使用配置单元创建了一个表我想筛选数据 create table student( id bigint ,name string , course array<string>) ROW FORMAT DELIMiTED fields terminated by '\t' collection items terminated by ',' STORED AS TEXTFILE; 基于cource=hadoop对该数据进行筛选 请任何人帮帮我 sele

我使用配置单元创建了一个表我想筛选数据

create table student(
      id bigint
     ,name string
     , course array<string>)
ROW FORMAT DELIMiTED fields terminated by '\t'
collection items terminated by ','
STORED AS TEXTFILE;
基于cource=hadoop对该数据进行筛选

请任何人帮帮我

select  * 
from    student
where   array_contains (course,'hadoop')
;



equal或contains?课程数据类型包含上述数据,我想筛选正在学习hadoop课程的学生equal或contains?课程数据类型包含上述数据,我想筛选正在学习hadoop课程的学生
select  * 
from    student
where   array_contains (course,'hadoop')
;
+-----+----------+--------------------------+
| id  |   name   |          course          |
+-----+----------+--------------------------+
| 100 | student1 | ["java",".net","hadoop"] |
| 101 | student2 | [".net","hadoop"]        |
| 102 | student3 | ["java","hadoop"]        |
| 103 | student4 | [".net","hadoop"]        |
| 105 | student6 | ["java",".net","hadoop"] |
| 106 | student7 | [".net","hadoop"]        |
+-----+----------+--------------------------+