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/07/30 01:06:21 UTC

[GitHub] [spark] maropu commented on a change in pull request #24862: [SPARK-28038][SQL][TEST] Port text.sql

maropu commented on a change in pull request #24862: [SPARK-28038][SQL][TEST] Port text.sql
URL: https://github.com/apache/spark/pull/24862#discussion_r308496848
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/pgSQL/text.sql
 ##########
 @@ -0,0 +1,134 @@
+--
+-- Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
+--
+--
+-- TEXT
+-- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/text.sql
+
+SELECT string('this is a text string') = string('this is a text string') AS true;
+
+SELECT string('this is a text string') = string('this is a text strin') AS `false`;
+
+CREATE TABLE TEXT_TBL (f1 string) USING parquet;
+
+INSERT INTO TEXT_TBL VALUES ('doh!');
+INSERT INTO TEXT_TBL VALUES ('hi de ho neighbor');
+
+SELECT '' AS two, * FROM TEXT_TBL;
+
+-- As of 8.3 we have removed most implicit casts to text, so that for example
+-- this no longer works:
+-- Spark SQL implicit cast integer to string
+select length(42);
 
 Review comment:
   FYI: If we strictly follow ANSI/SQL, we don't allow this implicit cast along with PostgresSQL.
   cc: @gengliangwang 

----------------------------------------------------------------
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