Commit 7b521fe1 authored by 高雅喆's avatar 高雅喆

bug fix

parent b2ae2b9e
...@@ -476,9 +476,9 @@ object GetPortrait { ...@@ -476,9 +476,9 @@ object GetPortrait {
val diary_tag = sc.sql( val diary_tag = sc.sql(
s""" s"""
|select d.diary_id, |select d.diary_id,
|if(d.tag_type = '1',d.level1_ids,"") level1_ids, |max(if(d.tag_type = '1',d.level1_ids,"")) level1_ids,
|if(d.tag_type = '2',d.level2_ids,"") level2_ids, |max(if(d.tag_type = '2',d.level2_ids,"")) level2_ids,
|if(d.tag_type = '3',d.level3_ids,"") level3_ids from |max(if(d.tag_type = '3',d.level3_ids,"")) level3_ids from
| (select c.diary_id,c.tag_type, | (select c.diary_id,c.tag_type,
| concat_ws(',',collect_set(cast(c.level1_id as string))) as level1_ids, | concat_ws(',',collect_set(cast(c.level1_id as string))) as level1_ids,
| concat_ws(',',collect_set(cast(c.level2_id as string))) as level2_ids, | concat_ws(',',collect_set(cast(c.level2_id as string))) as level2_ids,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment