Re: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[]

2022-11-03 Thread eric xiao
gt; >> > I'm a little of doubt about the spark's behavior. But from my sides, > >> seems Spark actually use string type which is different from your > >> investigation. > >> > I try with the following sql in spark-cli: > >> > ` > >> > select array() + 1 >

Re: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[]

2022-10-28 Thread yuxia
`ARRAY`/ `INT ARRAY` is for declaring data type in DDL like `create table t1(a INT ARRAY)`. Best regards, Yuxia - 原始邮件 - 发件人: "eric xiao" 收件人: "dev" 发送时间: 星期六, 2022年 10 月 29日 上午 7:50:22 主题: Re: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[] Upon f

Re: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[]

2022-10-28 Thread eric xiao
: differing types in '(array() + 1)' (array and int).; line >> 1 pos 7; >> > 'Project [unresolvedalias((array() + 1), None)] >> > +- OneRowRelation >> > ` >> > >> > >> > Seems it's hard to decide which data type Flink should use. I'm >>

Re: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[]

2022-10-28 Thread eric xiao
; > > Seems it's hard to decide which data type Flink should use. I'm > insterested in the reason why you would like to use Integer type. > > I haven't cheked whether the sql stardard specifies it. But from my > side, I prefer to follow Hive/Spark. > > > > BTW: the quer

Re: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[]

2022-10-28 Thread Timo Walther
: the query `SELECT COALESCE(1, cast(ARRAY() as int))` will fail in Hive and Spark. Best regards, Yuxia - 原始邮件 - 发件人: "eric xiao" 收件人: "dev" 发送时间: 星期四, 2022年 10 月 27日 下午 9:13:51 主题: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[] Hi, I would like t

Re: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[]

2022-10-27 Thread yuxia
. BTW: the query `SELECT COALESCE(1, cast(ARRAY() as int))` will fail in Hive and Spark. Best regards, Yuxia - 原始邮件 - 发件人: "eric xiao" 收件人: "dev" 发送时间: 星期四, 2022年 10 月 27日 下午 9:13:51 主题: [DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[] Hi, I w

[DISCUSS] FLINK-20578 Cannot create empty array using ARRAY[]

2022-10-27 Thread eric xiao
Hi, I would like to propose a solution to this JIRA issue. I looked at the comments and there was some guidance around where in the code we should update to allow for this behaviour. But I believe there are still two questions that remain open: 1. Is this expected behaviour (i.e. users should