[ https://issues.apache.org/jira/browse/SPARK-29846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971505#comment-16971505 ]
Ankit Raj Boudh commented on SPARK-29846: ----------------------------------------- I will raise PR for this. > 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> > {code} > *postgresql* > select cast ('10.2222222222222222222222333333333333333' as char(5)); > > || ||bpchar|| > |1|10.22| -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org