You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/22 13:57:45 UTC

[GitHub] [spark] gengliangwang commented on issue #26208: [WIP][SPARK-29540][SQL]Support cast StringType to DateType follow ansi

gengliangwang commented on issue #26208: [WIP][SPARK-29540][SQL]Support cast StringType to DateType follow ansi
URL: https://github.com/apache/spark/pull/26208#issuecomment-544975450
 
 
   I think PostgreSQL is making exception for type conversion with constant values.
   If you tried the following SQL in PostgreSQL,
   ```
   create table a(t timestamp);
   create table b(s varchar(20));
   insert into a select * from b;
   ```
   You will get following error:
   ```
   ERROR: column "t" is of type timestamp without time zone but expression is of type character varying
     Hint: You will need to rewrite or cast the expression.
   ```
   
   In the PR https://github.com/apache/spark/pull/26107, I disallow such conversion and update test cases intentionally. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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