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/10/30 09:52:00 UTC
[jira] [Comment Edited] (SPARK-29636) Can't parse '11:00 BST' or
'2000-10-19 10:23:54+01' signatures to timestamp
[ https://issues.apache.org/jira/browse/SPARK-29636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16962865#comment-16962865 ]
Aman Omer edited comment on SPARK-29636 at 10/30/19 9:51 AM:
-------------------------------------------------------------
[~DylanGuedes]
Query 1-
{code:java}
select cast ('2000-10-19 10:23:54+01' as timestamp);{code}
PostgreSQL: 19.10.2000 10:23:54
SparkSQL: 2000-10-19 14:53:54
Query 2-
{code:java}
select cast ('11:00 BST' as timestamp);{code}
PostgreSQL: invalid input syntax for type timestamp: "11:00 BST"
SparkSQL: NULL
However, output of postgres is different from spark sql, but spark is able to parse both queries.
was (Author: aman_omer):
[~DylanGuedes]
Query 1-
{code:java}
select cast ('2000-10-19 10:23:54+01' as timestamp);{code}
PostgreSQL: 19.10.2000 10:23:54
SparkSQL: 2000-10-19 14:53:54
Query 2-
{code:java}
select cast ('11:00 BST' as timestamp);{code}
PostgreSQL: invalid input syntax for type timestamp: "11:00 BST"
SparkSQL: NULL
However, output of postgres is different from spark sql, but spark is able to parse both queries.
> Can't parse '11:00 BST' or '2000-10-19 10:23:54+01' signatures to timestamp
> ---------------------------------------------------------------------------
>
> Key: SPARK-29636
> URL: https://issues.apache.org/jira/browse/SPARK-29636
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 3.0.0
> Reporter: Dylan Guedes
> Priority: Major
>
> Currently, Spark can't parse a string such as '11:00 BST' or '2000-10-19 10:23:54+01' to timestamp:
> {code:sql}
> spark-sql> select cast ('11:00 BST' as timestamp);
> NULL
> Time taken: 2.248 seconds, Fetched 1 row(s)
> {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