Skip to content

Conversation

@iRakson
Copy link
Contributor

@iRakson iRakson commented Nov 15, 2019

What changes were proposed in this pull request?

cast to smallint behaviour in SparkSQL is made consistent with PostgreSQL when spark.sql.dialect is set to PostgreSQL.

Why are the changes needed?

SparkSQL and PostgreSQL behaviour is very different when casting to smallint.
For e.g:
select cast('abc' to smallint) in SparkSQL gives null.
select cast('abc' to smallint) in PostgreSQL gives "invalid input syntax for integer: abc"

Does this PR introduce any user-facing change?

Yes

How was this patch tested?

Manually. Test cases will be added soon.

@iRakson iRakson changed the title [SPARK-29887][SQL]PostgreSQL dialect: cast to smallint [WIP][SPARK-29887][SQL]PostgreSQL dialect: cast to smallint Nov 15, 2019
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@dongjoon-hyun
Copy link
Member

Thank you for contribution, @iRakson . But, unfortunately, we decided to remove PostgreSQL dialect via SPARK-30125 (#26763). Sorry about that. I'll close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants