蜂巢表映射类型K-V为每个K-V对“:”指定了分隔符,但仍显示默认分隔符“ =”

时间:2018-09-19 05:05:10

标签: hive hiveql

像这样创建表:

create table xxx:
     (
       user_id       bigint  comment '',
       order_count   map<string,string> comment ''
      ) comment '' 
      PARTITIONED BY (`partition_date` string comment "")
     row format delimited fields terminated by '\t' collection items 
       terminated by ',' map keys terminated by ':' lines terminated by '\n'

inser sql this:

str_to_map(concat_ws(",",collect_set(concat_ws(':', datetime_type, cast(order_count as string)))),',',':')

当选择显示时:

{"30d=2","365d"=3,"60d"="3","90d"="3","180d"="3"}

enter image description here

我为每个K-V对指定了分隔符“:”,但是为什么仍显示默认分隔符“ =”  以及如何表现像 {"30d:2","365d":3,"60d":"3","90d":"3","180d":"3"}

谢谢。

0 个答案:

没有答案