wangyum commented on a change in pull request #24767: [SPARK-27918][SQL] Port
boolean.sql
URL: https://github.com/apache/spark/pull/24767#discussion_r293226760
##########
File path: sql/core/src/test/resources/sql-tests/results/pgSQL/boolean.sql.out
##########
@@ -0,0 +1,710 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 81
+
+
+-- !query 0
+SELECT 1 AS one
+-- !query 0 schema
+struct<one:int>
+-- !query 0 output
+1
+
+
+-- !query 1
+SELECT true AS true
+-- !query 1 schema
+struct<true:boolean>
+-- !query 1 output
+true
+
+
+-- !query 2
+SELECT false AS false
+-- !query 2 schema
+struct<false:boolean>
+-- !query 2 output
+false
+
+
+-- !query 3
+SELECT cast('t' as boolean) AS true
+-- !query 3 schema
+struct<true:boolean>
+-- !query 3 output
+true
+
+
+-- !query 4
+SELECT cast(' f ' as boolean) AS false
+-- !query 4 schema
+struct<false:boolean>
+-- !query 4 output
+NULL
+
+
+-- !query 5
+SELECT cast('true' as boolean) AS true
+-- !query 5 schema
+struct<true:boolean>
+-- !query 5 output
+true
+
+
+-- !query 6
+SELECT cast('test' as boolean) AS error
+-- !query 6 schema
+struct<error:boolean>
+-- !query 6 output
+NULL
+
+
+-- !query 7
+SELECT cast('false' as boolean) AS false
+-- !query 7 schema
+struct<false:boolean>
+-- !query 7 output
+false
+
+
+-- !query 8
+SELECT cast('foo' as boolean) AS error
+-- !query 8 schema
+struct<error:boolean>
+-- !query 8 output
+NULL
+
+
+-- !query 9
+SELECT cast('y' as boolean) AS true
+-- !query 9 schema
+struct<true:boolean>
+-- !query 9 output
+true
+
+
+-- !query 10
+SELECT cast('yes' as boolean) AS true
+-- !query 10 schema
+struct<true:boolean>
+-- !query 10 output
+true
+
+
+-- !query 11
+SELECT cast('yeah' as boolean) AS error
+-- !query 11 schema
+struct<error:boolean>
+-- !query 11 output
+NULL
+
+
+-- !query 12
+SELECT cast('n' as boolean) AS false
+-- !query 12 schema
+struct<false:boolean>
+-- !query 12 output
+false
+
+
+-- !query 13
+SELECT cast('no' as boolean) AS false
+-- !query 13 schema
+struct<false:boolean>
+-- !query 13 output
+false
+
+
+-- !query 14
+SELECT cast('nay' as boolean) AS error
+-- !query 14 schema
+struct<error:boolean>
+-- !query 14 output
+NULL
+
+
+-- !query 15
+SELECT cast('on' as boolean) AS true
+-- !query 15 schema
+struct<true:boolean>
+-- !query 15 output
+NULL
+
+
+-- !query 16
+SELECT cast('off' as boolean) AS false
+-- !query 16 schema
+struct<false:boolean>
+-- !query 16 output
+NULL
+
+
+-- !query 17
+SELECT cast('of' as boolean) AS false
+-- !query 17 schema
+struct<false:boolean>
+-- !query 17 output
+NULL
Review comment:
PostgreSQL fixed the doc:
https://github.com/postgres/postgres/commit/9729c9360886bee7feddc6a1124b0742de4b9f3d
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]