Re: Questions about UDTF in flink SQL

2018-11-30 Thread wangsan
Hi Rong, Yes, what Jark described is exactly whet I need. Currently we have a work around for this problem, by using a UDF whose result type is a Map. I will took a look on your proposals and PR. Thanks for your help and suggestions. Best, Wangsan > On Dec 1, 2018, at 7:30 AM, Rong Rong wr

Re: Questions about UDTF in flink SQL

2018-11-30 Thread Rong Rong
Hi Wangsan, If your require is essentially wha Jark describe, we already have a proposal following up [FLINK-9249] in its related/parent task: [FLINK-9484]. We are already implementing some of these internally and have one PR ready for review for FLINK-9294. Please kindly take a look and see if t

Re: Questions about UDTF in flink SQL

2018-11-30 Thread Jark Wu
Hi Wangsan, If I understand correctly, you want the return type of UDTF is determined by the actual arguments, not a fixed result type. For example: udtf("int, string, long", inputField)returns a composite type with [f0: INT, f1: VARCHAR, f2: BIGINT] udtf("int", inputField)returns an at

Re: Questions about UDTF in flink SQL

2018-11-29 Thread Timo Walther
Hi Wangsan, currently, UDFs have very strict result type assumptions. This is necessary to determine the serializers for the cluster. There were multiple requests for more flexible handling of types in UDFs. Please have a look at: - [FLINK-7358] Add implicitly converts support for User-define