Re: spark udf can not change a json string to a map

2016-05-18 Thread Ted Yu
ut map to table. > > CREATE TABLE `a_parquet`( > parameters map > ) > > insert into a_parquet select UDF(parameters ) from a_text; > > So do you have any suggestions? > > > > > > > -- 原始邮件 -- > *发件人:* "Ted Y

?????? spark udf can not change a json string to a map

2016-05-16 Thread ??????
ers -- -- ??: "??";<251922...@qq.com>; : 2016??5??16??(??) 10:00 ??: "Ted Yu"; : "user"; ????: ?? spark udf can not change a json string to a map this is my usecase: Another system upload csv files to my syste

?????? spark udf can not change a json string to a map

2016-05-15 Thread ??????
uggestions? -- -- ??: "Ted Yu";; : 2016??5??16??(??) 0:44 ??: "??"<251922...@qq.com>; ????: "user"; ????: Re: spark udf can not change a json string to a map Can you let us know more about your use case ? I wonder if you can structur

Re: spark udf can not change a json string to a map

2016-05-15 Thread Ted Yu
Can you let us know more about your use case ? I wonder if you can structure your udf by not returning Map. Cheers On Sun, May 15, 2016 at 9:18 AM, 喜之郎 <251922...@qq.com> wrote: > Hi, all. I want to implement a udf which is used to change a json string > to a map. > But some problem occurs. My

spark udf can not change a json string to a map

2016-05-15 Thread ??????
Hi, all. I want to implement a udf which is used to change a json string to a map. But some problem occurs. My spark version:1.5.1. my udf code: public Map evaluate(final String s) { if (s == null) return null;