You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "KaiXinXIaoLei (JIRA)" <ji...@apache.org> on 2016/03/22 10:18:25 UTC

[jira] [Updated] (SPARK-14066) Set "spark.sql.dialect=sql", there is a problen in running query "select percentile(d,array(0,0.2,0.3,1)) as a from t;"

     [ https://issues.apache.org/jira/browse/SPARK-14066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

KaiXinXIaoLei updated SPARK-14066:
----------------------------------
    Description: 
In spark 1.5.1, I run "sh bin/spark-sql  --conf spark.sql.dialect=sql", and run query "select percentile(d,array(0,0.2,0.3,1))  as  a from t". There is a problem as follows.

spark-sql>  select percentile(d,array(0,0.2,0.3,1))  as  a from t;
16/03/22 17:14:05 INFO HiveMetaStore: 0: get_table : db=default tbl=t
16/03/22 17:14:05 INFO audit: ugi=root  ip=unknown-ip-addr      cmd=get_table : db=default tbl=t
16/03/22 17:14:06 INFO audit: ugi=root  ip=unknown-ip-addr      cmd=get_table    result=success  details=null
Error in query: cannot resolve 'array(0,0.2,0.3,1)' due to data type mismatch: input to function array should all be the same type, but it's [int, decimal(1,1), decimal(1,1), int];

  was:
In spark 1.5.1, I run "sh bin/spark-sql  --conf spark.sql.dialect=sql", and run query "select percentile(d,array(0,0.2,0.3,1))  as  a from t". 

spark-sql>  select percentile(d,array(0,0.2,0.3,1))  as  a from t;
16/03/22 17:14:05 INFO HiveMetaStore: 0: get_table : db=default tbl=t
16/03/22 17:14:05 INFO audit: ugi=root  ip=unknown-ip-addr      cmd=get_table : db=default tbl=t
16/03/22 17:14:06 INFO audit: ugi=root  ip=unknown-ip-addr      cmd=get_table    result=success  details=null
Error in query: cannot resolve 'array(0,0.2,0.3,1)' due to data type mismatch: input to function array should all be the same type, but it's [int, decimal(1,1), decimal(1,1), int];


> Set "spark.sql.dialect=sql", there is a problen in running query "select percentile(d,array(0,0.2,0.3,1))  as  a from t;"
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-14066
>                 URL: https://issues.apache.org/jira/browse/SPARK-14066
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.1
>            Reporter: KaiXinXIaoLei
>             Fix For: 2.0.0
>
>
> In spark 1.5.1, I run "sh bin/spark-sql  --conf spark.sql.dialect=sql", and run query "select percentile(d,array(0,0.2,0.3,1))  as  a from t". There is a problem as follows.
> spark-sql>  select percentile(d,array(0,0.2,0.3,1))  as  a from t;
> 16/03/22 17:14:05 INFO HiveMetaStore: 0: get_table : db=default tbl=t
> 16/03/22 17:14:05 INFO audit: ugi=root  ip=unknown-ip-addr      cmd=get_table : db=default tbl=t
> 16/03/22 17:14:06 INFO audit: ugi=root  ip=unknown-ip-addr      cmd=get_table    result=success  details=null
> Error in query: cannot resolve 'array(0,0.2,0.3,1)' due to data type mismatch: input to function array should all be the same type, but it's [int, decimal(1,1), decimal(1,1), int];



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org