Re: Clean way of expressing UNNEST operations

2019-06-04 Thread Piyush Narang
ut all three fields instead of t(product), I don’t face the issue.. Thanks, -- Piyush From: JingsongLee Reply-To: JingsongLee Date: Tuesday, June 4, 2019 at 2:42 AM To: JingsongLee , Piyush Narang , "user@flink.apache.org" Subject: Re: Clean way of expressing UNNE

Re: Clean way of expressing UNNEST operations

2019-06-04 Thread JingsongLee
, JingsongLee -- From:JingsongLee Send Time:2019年6月4日(星期二) 13:35 To:Piyush Narang ; user@flink.apache.org Subject:Re: Clean way of expressing UNNEST operations Hi @Piyush Narang It seems that Calcite's type inference is not perfect

Re: Clean way of expressing UNNEST operations

2019-06-03 Thread JingsongLee
Hi @Piyush Narang It seems that Calcite's type inference is not perfect, and the fields of return type can not be inferred in UNNEST. (Errors were reported during the Calcite Validate phase.) But UDTF supports this usage, and if it's convenient, you might consider writing a UDTF with similar

Clean way of expressing UNNEST operations

2019-06-03 Thread Piyush Narang
Hi folks, I’m using the SQL API and trying to figure out the best way to unnest and operate on some data. My data is structured as follows: Table: Advertiser_event: * Partnered: Int * Products: Array< Row< price: Double, quantity: Int, … > > * … I’m trying to unnest the products