You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "jobit mathew (Jira)" <ji...@apache.org> on 2019/11/11 12:46:00 UTC

[jira] [Updated] (SPARK-29846) PostgreSQL dialect: cast to char

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

jobit mathew updated SPARK-29846:
---------------------------------
    Description: 
Make SparkSQL's cast to char behavior be consistent with PostgreSQL when

spark.sql.dialect is configured as PostgreSQL.
{code:java}
spark-sql> select cast ('10.2222222222222222222222333333333333333' as char(5));
10.2222222222222222222222333333333333333
Time taken: 0.062 seconds, Fetched 1 row(s)
spark-sql>
*postgresql*
select cast ('10.2222222222222222222222333333333333333' as char(5));
  	bpchar
1	10.22


{code}

  was:
Make SparkSQL's cast to char behavior be consistent with PostgreSQL when

spark.sql.dialect is configured as PostgreSQL.


> PostgreSQL dialect: cast to char
> --------------------------------
>
>                 Key: SPARK-29846
>                 URL: https://issues.apache.org/jira/browse/SPARK-29846
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: jobit mathew
>            Priority: Minor
>
> Make SparkSQL's cast to char behavior be consistent with PostgreSQL when
> spark.sql.dialect is configured as PostgreSQL.
> {code:java}
> spark-sql> select cast ('10.2222222222222222222222333333333333333' as char(5));
> 10.2222222222222222222222333333333333333
> Time taken: 0.062 seconds, Fetched 1 row(s)
> spark-sql>
> *postgresql*
> select cast ('10.2222222222222222222222333333333333333' as char(5));
>   	bpchar
> 1	10.22
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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