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

[jira] [Commented] (SPARK-29840) PostgreSQL dialect: cast to integer

    [ https://issues.apache.org/jira/browse/SPARK-29840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971476#comment-16971476 ] 

Aman Omer commented on SPARK-29840:
-----------------------------------

Working on this.

> PostgreSQL dialect: cast to integer
> -----------------------------------
>
>                 Key: SPARK-29840
>                 URL: https://issues.apache.org/jira/browse/SPARK-29840
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: jobit mathew
>            Priority: Major
>
> Make SparkSQL's cast to integer  behavior be consistent with PostgreSQL when 
> spark.sql.dialect is configured as PostgreSQL.
> Example:*currently spark sql*
> {code:java}
> spark-sql> select   CAST ('10C' AS INTEGER);
> NULL
> Time taken: 0.051 seconds, Fetched 1 row(s)
> spark-sql>
> {code}
> *postgresql*
> {code:java}
> postgresql
> select   CAST ('10C' AS INTEGER);
> Error(s), warning(s):
> 22P02: invalid input syntax for integer: "10C"
> {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