You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/05/26 20:17:23 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #41319: [SPARK-43815] Add to_varchar alias for to_char

MaxGekk commented on code in PR #41319:
URL: https://github.com/apache/spark/pull/41319#discussion_r1207298536


##########
sql/core/src/test/resources/sql-tests/inputs/postgreSQL/numeric.sql:
##########
@@ -884,6 +884,12 @@ SELECT '' AS to_char_10, to_char(val, 'S0999999999999999.999999999999999'), val
 -- SELECT '' AS to_char_35, to_char('100'::numeric, 'f"ool\"999');
 -- SELECT '' AS to_char_36, to_char('100'::numeric, 'f"ool\\"999');
 
+-- [SPARK-43815] Add to_varchar alias for to_char
+-- TO_VARCHAR()
+-- Alias of TO_CHAR()
+SELECT '' AS to_varchar_3, to_varchar(val, '9999999999999999.999999999999999PR'), val

Review Comment:
   Could you move this test out from the `postgreSQL` folder, for instance to `sql-tests/inputs/charvarchar.sql`.
   
   The tests like this were borrowed from PostgreSQL when we tried to achieve feature parity to the DBMS:
   https://issues.apache.org/jira/browse/SPARK-27763
   It is better to don't add new checks there.
   
   



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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