Repository: spark
Updated Branches:
  refs/heads/master 77988a9d0 -> 7f6d10a73


http://git-wip-us.apache.org/repos/asf/spark/blob/7f6d10a7/sql/core/src/test/resources/sql-tests/results/typeCoercion/native/promoteStrings.sql.out
----------------------------------------------------------------------
diff --git 
a/sql/core/src/test/resources/sql-tests/results/typeCoercion/native/promoteStrings.sql.out
 
b/sql/core/src/test/resources/sql-tests/results/typeCoercion/native/promoteStrings.sql.out
new file mode 100644
index 0000000..0beb1f6
--- /dev/null
+++ 
b/sql/core/src/test/resources/sql-tests/results/typeCoercion/native/promoteStrings.sql.out
@@ -0,0 +1,2578 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 316
+
+
+-- !query 0
+CREATE TEMPORARY VIEW t AS SELECT 1
+-- !query 0 schema
+struct<>
+-- !query 0 output
+
+
+
+-- !query 1
+SELECT '1' + cast(1 as tinyint)                         FROM t
+-- !query 1 schema
+struct<(CAST(1 AS DOUBLE) + CAST(CAST(1 AS TINYINT) AS DOUBLE)):double>
+-- !query 1 output
+2.0
+
+
+-- !query 2
+SELECT '1' + cast(1 as smallint)                        FROM t
+-- !query 2 schema
+struct<(CAST(1 AS DOUBLE) + CAST(CAST(1 AS SMALLINT) AS DOUBLE)):double>
+-- !query 2 output
+2.0
+
+
+-- !query 3
+SELECT '1' + cast(1 as int)                             FROM t
+-- !query 3 schema
+struct<(CAST(1 AS DOUBLE) + CAST(CAST(1 AS INT) AS DOUBLE)):double>
+-- !query 3 output
+2.0
+
+
+-- !query 4
+SELECT '1' + cast(1 as bigint)                          FROM t
+-- !query 4 schema
+struct<(CAST(1 AS DOUBLE) + CAST(CAST(1 AS BIGINT) AS DOUBLE)):double>
+-- !query 4 output
+2.0
+
+
+-- !query 5
+SELECT '1' + cast(1 as float)                           FROM t
+-- !query 5 schema
+struct<(CAST(1 AS DOUBLE) + CAST(CAST(1 AS FLOAT) AS DOUBLE)):double>
+-- !query 5 output
+2.0
+
+
+-- !query 6
+SELECT '1' + cast(1 as double)                          FROM t
+-- !query 6 schema
+struct<(CAST(1 AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 6 output
+2.0
+
+
+-- !query 7
+SELECT '1' + cast(1 as decimal(10, 0))                  FROM t
+-- !query 7 schema
+struct<(CAST(1 AS DOUBLE) + CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):double>
+-- !query 7 output
+2.0
+
+
+-- !query 8
+SELECT '1' + '1'                                        FROM t
+-- !query 8 schema
+struct<(CAST(1 AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 8 output
+2.0
+
+
+-- !query 9
+SELECT '1' + cast('1' as binary)                        FROM t
+-- !query 9 schema
+struct<>
+-- !query 9 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) + CAST('1' AS BINARY))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) + CAST('1' AS BINARY))' 
(double and binary).; line 1 pos 7
+
+
+-- !query 10
+SELECT '1' + cast(1 as boolean)                         FROM t
+-- !query 10 schema
+struct<>
+-- !query 10 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) + CAST(1 AS BOOLEAN))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) + CAST(1 AS BOOLEAN))' 
(double and boolean).; line 1 pos 7
+
+
+-- !query 11
+SELECT '1' + cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 11 schema
+struct<>
+-- !query 11 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) + CAST('2017-12-11 09:30:00.0' AS 
TIMESTAMP))' due to data type mismatch: differing types in '(CAST('1' AS 
DOUBLE) + CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' (double and timestamp).; 
line 1 pos 7
+
+
+-- !query 12
+SELECT '1' + cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 12 schema
+struct<>
+-- !query 12 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) + CAST('2017-12-11 09:30:00' AS DATE))' 
due to data type mismatch: differing types in '(CAST('1' AS DOUBLE) + 
CAST('2017-12-11 09:30:00' AS DATE))' (double and date).; line 1 pos 7
+
+
+-- !query 13
+SELECT '1' - cast(1 as tinyint)                         FROM t
+-- !query 13 schema
+struct<(CAST(1 AS DOUBLE) - CAST(CAST(1 AS TINYINT) AS DOUBLE)):double>
+-- !query 13 output
+0.0
+
+
+-- !query 14
+SELECT '1' - cast(1 as smallint)                        FROM t
+-- !query 14 schema
+struct<(CAST(1 AS DOUBLE) - CAST(CAST(1 AS SMALLINT) AS DOUBLE)):double>
+-- !query 14 output
+0.0
+
+
+-- !query 15
+SELECT '1' - cast(1 as int)                             FROM t
+-- !query 15 schema
+struct<(CAST(1 AS DOUBLE) - CAST(CAST(1 AS INT) AS DOUBLE)):double>
+-- !query 15 output
+0.0
+
+
+-- !query 16
+SELECT '1' - cast(1 as bigint)                          FROM t
+-- !query 16 schema
+struct<(CAST(1 AS DOUBLE) - CAST(CAST(1 AS BIGINT) AS DOUBLE)):double>
+-- !query 16 output
+0.0
+
+
+-- !query 17
+SELECT '1' - cast(1 as float)                           FROM t
+-- !query 17 schema
+struct<(CAST(1 AS DOUBLE) - CAST(CAST(1 AS FLOAT) AS DOUBLE)):double>
+-- !query 17 output
+0.0
+
+
+-- !query 18
+SELECT '1' - cast(1 as double)                          FROM t
+-- !query 18 schema
+struct<(CAST(1 AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 18 output
+0.0
+
+
+-- !query 19
+SELECT '1' - cast(1 as decimal(10, 0))                  FROM t
+-- !query 19 schema
+struct<(CAST(1 AS DOUBLE) - CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):double>
+-- !query 19 output
+0.0
+
+
+-- !query 20
+SELECT '1' - '1'                                        FROM t
+-- !query 20 schema
+struct<(CAST(1 AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 20 output
+0.0
+
+
+-- !query 21
+SELECT '1' - cast('1' as binary)                        FROM t
+-- !query 21 schema
+struct<>
+-- !query 21 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) - CAST('1' AS BINARY))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) - CAST('1' AS BINARY))' 
(double and binary).; line 1 pos 7
+
+
+-- !query 22
+SELECT '1' - cast(1 as boolean)                         FROM t
+-- !query 22 schema
+struct<>
+-- !query 22 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) - CAST(1 AS BOOLEAN))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) - CAST(1 AS BOOLEAN))' 
(double and boolean).; line 1 pos 7
+
+
+-- !query 23
+SELECT '1' - cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 23 schema
+struct<>
+-- !query 23 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) - CAST('2017-12-11 09:30:00.0' AS 
TIMESTAMP))' due to data type mismatch: differing types in '(CAST('1' AS 
DOUBLE) - CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' (double and timestamp).; 
line 1 pos 7
+
+
+-- !query 24
+SELECT '1' - cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 24 schema
+struct<>
+-- !query 24 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) - CAST('2017-12-11 09:30:00' AS DATE))' 
due to data type mismatch: differing types in '(CAST('1' AS DOUBLE) - 
CAST('2017-12-11 09:30:00' AS DATE))' (double and date).; line 1 pos 7
+
+
+-- !query 25
+SELECT '1' * cast(1 as tinyint)                         FROM t
+-- !query 25 schema
+struct<(CAST(1 AS DOUBLE) * CAST(CAST(1 AS TINYINT) AS DOUBLE)):double>
+-- !query 25 output
+1.0
+
+
+-- !query 26
+SELECT '1' * cast(1 as smallint)                        FROM t
+-- !query 26 schema
+struct<(CAST(1 AS DOUBLE) * CAST(CAST(1 AS SMALLINT) AS DOUBLE)):double>
+-- !query 26 output
+1.0
+
+
+-- !query 27
+SELECT '1' * cast(1 as int)                             FROM t
+-- !query 27 schema
+struct<(CAST(1 AS DOUBLE) * CAST(CAST(1 AS INT) AS DOUBLE)):double>
+-- !query 27 output
+1.0
+
+
+-- !query 28
+SELECT '1' * cast(1 as bigint)                          FROM t
+-- !query 28 schema
+struct<(CAST(1 AS DOUBLE) * CAST(CAST(1 AS BIGINT) AS DOUBLE)):double>
+-- !query 28 output
+1.0
+
+
+-- !query 29
+SELECT '1' * cast(1 as float)                           FROM t
+-- !query 29 schema
+struct<(CAST(1 AS DOUBLE) * CAST(CAST(1 AS FLOAT) AS DOUBLE)):double>
+-- !query 29 output
+1.0
+
+
+-- !query 30
+SELECT '1' * cast(1 as double)                          FROM t
+-- !query 30 schema
+struct<(CAST(1 AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 30 output
+1.0
+
+
+-- !query 31
+SELECT '1' * cast(1 as decimal(10, 0))                  FROM t
+-- !query 31 schema
+struct<(CAST(1 AS DOUBLE) * CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):double>
+-- !query 31 output
+1.0
+
+
+-- !query 32
+SELECT '1' * '1'                                        FROM t
+-- !query 32 schema
+struct<(CAST(1 AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 32 output
+1.0
+
+
+-- !query 33
+SELECT '1' * cast('1' as binary)                        FROM t
+-- !query 33 schema
+struct<>
+-- !query 33 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) * CAST('1' AS BINARY))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) * CAST('1' AS BINARY))' 
(double and binary).; line 1 pos 7
+
+
+-- !query 34
+SELECT '1' * cast(1 as boolean)                         FROM t
+-- !query 34 schema
+struct<>
+-- !query 34 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) * CAST(1 AS BOOLEAN))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) * CAST(1 AS BOOLEAN))' 
(double and boolean).; line 1 pos 7
+
+
+-- !query 35
+SELECT '1' * cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 35 schema
+struct<>
+-- !query 35 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) * CAST('2017-12-11 09:30:00.0' AS 
TIMESTAMP))' due to data type mismatch: differing types in '(CAST('1' AS 
DOUBLE) * CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' (double and timestamp).; 
line 1 pos 7
+
+
+-- !query 36
+SELECT '1' * cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 36 schema
+struct<>
+-- !query 36 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) * CAST('2017-12-11 09:30:00' AS DATE))' 
due to data type mismatch: differing types in '(CAST('1' AS DOUBLE) * 
CAST('2017-12-11 09:30:00' AS DATE))' (double and date).; line 1 pos 7
+
+
+-- !query 37
+SELECT '1' / cast(1 as tinyint)                         FROM t
+-- !query 37 schema
+struct<(CAST(1 AS DOUBLE) / CAST(CAST(1 AS TINYINT) AS DOUBLE)):double>
+-- !query 37 output
+1.0
+
+
+-- !query 38
+SELECT '1' / cast(1 as smallint)                        FROM t
+-- !query 38 schema
+struct<(CAST(1 AS DOUBLE) / CAST(CAST(1 AS SMALLINT) AS DOUBLE)):double>
+-- !query 38 output
+1.0
+
+
+-- !query 39
+SELECT '1' / cast(1 as int)                             FROM t
+-- !query 39 schema
+struct<(CAST(1 AS DOUBLE) / CAST(CAST(1 AS INT) AS DOUBLE)):double>
+-- !query 39 output
+1.0
+
+
+-- !query 40
+SELECT '1' / cast(1 as bigint)                          FROM t
+-- !query 40 schema
+struct<(CAST(1 AS DOUBLE) / CAST(CAST(1 AS BIGINT) AS DOUBLE)):double>
+-- !query 40 output
+1.0
+
+
+-- !query 41
+SELECT '1' / cast(1 as float)                           FROM t
+-- !query 41 schema
+struct<(CAST(1 AS DOUBLE) / CAST(CAST(1 AS FLOAT) AS DOUBLE)):double>
+-- !query 41 output
+1.0
+
+
+-- !query 42
+SELECT '1' / cast(1 as double)                          FROM t
+-- !query 42 schema
+struct<(CAST(1 AS DOUBLE) / CAST(1 AS DOUBLE)):double>
+-- !query 42 output
+1.0
+
+
+-- !query 43
+SELECT '1' / cast(1 as decimal(10, 0))                  FROM t
+-- !query 43 schema
+struct<(CAST(1 AS DOUBLE) / CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):double>
+-- !query 43 output
+1.0
+
+
+-- !query 44
+SELECT '1' / '1'                                        FROM t
+-- !query 44 schema
+struct<(CAST(1 AS DOUBLE) / CAST(1 AS DOUBLE)):double>
+-- !query 44 output
+1.0
+
+
+-- !query 45
+SELECT '1' / cast('1' as binary)                        FROM t
+-- !query 45 schema
+struct<>
+-- !query 45 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) / CAST('1' AS BINARY))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) / CAST('1' AS BINARY))' 
(double and binary).; line 1 pos 7
+
+
+-- !query 46
+SELECT '1' / cast(1 as boolean)                         FROM t
+-- !query 46 schema
+struct<>
+-- !query 46 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) / CAST(1 AS BOOLEAN))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) / CAST(1 AS BOOLEAN))' 
(double and boolean).; line 1 pos 7
+
+
+-- !query 47
+SELECT '1' / cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 47 schema
+struct<>
+-- !query 47 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) / CAST('2017-12-11 09:30:00.0' AS 
TIMESTAMP))' due to data type mismatch: differing types in '(CAST('1' AS 
DOUBLE) / CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' (double and timestamp).; 
line 1 pos 7
+
+
+-- !query 48
+SELECT '1' / cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 48 schema
+struct<>
+-- !query 48 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) / CAST('2017-12-11 09:30:00' AS DATE))' 
due to data type mismatch: differing types in '(CAST('1' AS DOUBLE) / 
CAST('2017-12-11 09:30:00' AS DATE))' (double and date).; line 1 pos 7
+
+
+-- !query 49
+SELECT '1' % cast(1 as tinyint)                         FROM t
+-- !query 49 schema
+struct<(CAST(1 AS DOUBLE) % CAST(CAST(1 AS TINYINT) AS DOUBLE)):double>
+-- !query 49 output
+0.0
+
+
+-- !query 50
+SELECT '1' % cast(1 as smallint)                        FROM t
+-- !query 50 schema
+struct<(CAST(1 AS DOUBLE) % CAST(CAST(1 AS SMALLINT) AS DOUBLE)):double>
+-- !query 50 output
+0.0
+
+
+-- !query 51
+SELECT '1' % cast(1 as int)                             FROM t
+-- !query 51 schema
+struct<(CAST(1 AS DOUBLE) % CAST(CAST(1 AS INT) AS DOUBLE)):double>
+-- !query 51 output
+0.0
+
+
+-- !query 52
+SELECT '1' % cast(1 as bigint)                          FROM t
+-- !query 52 schema
+struct<(CAST(1 AS DOUBLE) % CAST(CAST(1 AS BIGINT) AS DOUBLE)):double>
+-- !query 52 output
+0.0
+
+
+-- !query 53
+SELECT '1' % cast(1 as float)                           FROM t
+-- !query 53 schema
+struct<(CAST(1 AS DOUBLE) % CAST(CAST(1 AS FLOAT) AS DOUBLE)):double>
+-- !query 53 output
+0.0
+
+
+-- !query 54
+SELECT '1' % cast(1 as double)                          FROM t
+-- !query 54 schema
+struct<(CAST(1 AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 54 output
+0.0
+
+
+-- !query 55
+SELECT '1' % cast(1 as decimal(10, 0))                  FROM t
+-- !query 55 schema
+struct<(CAST(1 AS DOUBLE) % CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):double>
+-- !query 55 output
+0.0
+
+
+-- !query 56
+SELECT '1' % '1'                                        FROM t
+-- !query 56 schema
+struct<(CAST(1 AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 56 output
+0.0
+
+
+-- !query 57
+SELECT '1' % cast('1' as binary)                        FROM t
+-- !query 57 schema
+struct<>
+-- !query 57 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) % CAST('1' AS BINARY))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) % CAST('1' AS BINARY))' 
(double and binary).; line 1 pos 7
+
+
+-- !query 58
+SELECT '1' % cast(1 as boolean)                         FROM t
+-- !query 58 schema
+struct<>
+-- !query 58 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) % CAST(1 AS BOOLEAN))' due to data type 
mismatch: differing types in '(CAST('1' AS DOUBLE) % CAST(1 AS BOOLEAN))' 
(double and boolean).; line 1 pos 7
+
+
+-- !query 59
+SELECT '1' % cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 59 schema
+struct<>
+-- !query 59 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) % CAST('2017-12-11 09:30:00.0' AS 
TIMESTAMP))' due to data type mismatch: differing types in '(CAST('1' AS 
DOUBLE) % CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' (double and timestamp).; 
line 1 pos 7
+
+
+-- !query 60
+SELECT '1' % cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 60 schema
+struct<>
+-- !query 60 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS DOUBLE) % CAST('2017-12-11 09:30:00' AS DATE))' 
due to data type mismatch: differing types in '(CAST('1' AS DOUBLE) % 
CAST('2017-12-11 09:30:00' AS DATE))' (double and date).; line 1 pos 7
+
+
+-- !query 61
+SELECT pmod('1', cast(1 as tinyint))                         FROM t
+-- !query 61 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(CAST(1 AS TINYINT) AS DOUBLE)):double>
+-- !query 61 output
+0.0
+
+
+-- !query 62
+SELECT pmod('1', cast(1 as smallint))                        FROM t
+-- !query 62 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(CAST(1 AS SMALLINT) AS DOUBLE)):double>
+-- !query 62 output
+0.0
+
+
+-- !query 63
+SELECT pmod('1', cast(1 as int))                             FROM t
+-- !query 63 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(CAST(1 AS INT) AS DOUBLE)):double>
+-- !query 63 output
+0.0
+
+
+-- !query 64
+SELECT pmod('1', cast(1 as bigint))                          FROM t
+-- !query 64 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(CAST(1 AS BIGINT) AS DOUBLE)):double>
+-- !query 64 output
+0.0
+
+
+-- !query 65
+SELECT pmod('1', cast(1 as float))                           FROM t
+-- !query 65 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(CAST(1 AS FLOAT) AS DOUBLE)):double>
+-- !query 65 output
+0.0
+
+
+-- !query 66
+SELECT pmod('1', cast(1 as double))                          FROM t
+-- !query 66 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(1 AS DOUBLE)):double>
+-- !query 66 output
+0.0
+
+
+-- !query 67
+SELECT pmod('1', cast(1 as decimal(10, 0)))                  FROM t
+-- !query 67 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(CAST(1 AS DECIMAL(10,0)) AS 
DOUBLE)):double>
+-- !query 67 output
+0.0
+
+
+-- !query 68
+SELECT pmod('1', '1')                                        FROM t
+-- !query 68 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(1 AS DOUBLE)):double>
+-- !query 68 output
+0.0
+
+
+-- !query 69
+SELECT pmod('1', cast('1' as binary))                        FROM t
+-- !query 69 schema
+struct<>
+-- !query 69 output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'pmod(CAST('1' AS DOUBLE), CAST('1' AS BINARY))' due to data 
type mismatch: differing types in 'pmod(CAST('1' AS DOUBLE), CAST('1' AS 
BINARY))' (double and binary).; line 1 pos 7
+
+
+-- !query 70
+SELECT pmod('1', cast(1 as boolean))                         FROM t
+-- !query 70 schema
+struct<>
+-- !query 70 output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'pmod(CAST('1' AS DOUBLE), CAST(1 AS BOOLEAN))' due to data 
type mismatch: differing types in 'pmod(CAST('1' AS DOUBLE), CAST(1 AS 
BOOLEAN))' (double and boolean).; line 1 pos 7
+
+
+-- !query 71
+SELECT pmod('1', cast('2017-12-11 09:30:00.0' as timestamp)) FROM t
+-- !query 71 schema
+struct<>
+-- !query 71 output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'pmod(CAST('1' AS DOUBLE), CAST('2017-12-11 09:30:00.0' AS 
TIMESTAMP))' due to data type mismatch: differing types in 'pmod(CAST('1' AS 
DOUBLE), CAST('2017-12-11 09:30:00.0' AS TIMESTAMP))' (double and timestamp).; 
line 1 pos 7
+
+
+-- !query 72
+SELECT pmod('1', cast('2017-12-11 09:30:00' as date))        FROM t
+-- !query 72 schema
+struct<>
+-- !query 72 output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'pmod(CAST('1' AS DOUBLE), CAST('2017-12-11 09:30:00' AS 
DATE))' due to data type mismatch: differing types in 'pmod(CAST('1' AS 
DOUBLE), CAST('2017-12-11 09:30:00' AS DATE))' (double and date).; line 1 pos 7
+
+
+-- !query 73
+SELECT cast(1 as tinyint)                         + '1' FROM t
+-- !query 73 schema
+struct<(CAST(CAST(1 AS TINYINT) AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 73 output
+2.0
+
+
+-- !query 74
+SELECT cast(1 as smallint)                        + '1' FROM t
+-- !query 74 schema
+struct<(CAST(CAST(1 AS SMALLINT) AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 74 output
+2.0
+
+
+-- !query 75
+SELECT cast(1 as int)                             + '1' FROM t
+-- !query 75 schema
+struct<(CAST(CAST(1 AS INT) AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 75 output
+2.0
+
+
+-- !query 76
+SELECT cast(1 as bigint)                          + '1' FROM t
+-- !query 76 schema
+struct<(CAST(CAST(1 AS BIGINT) AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 76 output
+2.0
+
+
+-- !query 77
+SELECT cast(1 as float)                           + '1' FROM t
+-- !query 77 schema
+struct<(CAST(CAST(1 AS FLOAT) AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 77 output
+2.0
+
+
+-- !query 78
+SELECT cast(1 as double)                          + '1' FROM t
+-- !query 78 schema
+struct<(CAST(1 AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 78 output
+2.0
+
+
+-- !query 79
+SELECT cast(1 as decimal(10, 0))                  + '1' FROM t
+-- !query 79 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) + CAST(1 AS DOUBLE)):double>
+-- !query 79 output
+2.0
+
+
+-- !query 80
+SELECT cast('1' as binary)                        + '1' FROM t
+-- !query 80 schema
+struct<>
+-- !query 80 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS BINARY) + CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST('1' AS BINARY) + CAST('1' AS DOUBLE))' 
(binary and double).; line 1 pos 7
+
+
+-- !query 81
+SELECT cast(1 as boolean)                         + '1' FROM t
+-- !query 81 schema
+struct<>
+-- !query 81 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST(1 AS BOOLEAN) + CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST(1 AS BOOLEAN) + CAST('1' AS DOUBLE))' 
(boolean and double).; line 1 pos 7
+
+
+-- !query 82
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) + '1' FROM t
+-- !query 82 schema
+struct<>
+-- !query 82 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00.0' AS TIMESTAMP) + CAST('1' AS 
DOUBLE))' due to data type mismatch: differing types in '(CAST('2017-12-11 
09:30:00.0' AS TIMESTAMP) + CAST('1' AS DOUBLE))' (timestamp and double).; line 
1 pos 7
+
+
+-- !query 83
+SELECT cast('2017-12-11 09:30:00' as date)        + '1' FROM t
+-- !query 83 schema
+struct<>
+-- !query 83 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00' AS DATE) + CAST('1' AS DOUBLE))' 
due to data type mismatch: differing types in '(CAST('2017-12-11 09:30:00' AS 
DATE) + CAST('1' AS DOUBLE))' (date and double).; line 1 pos 7
+
+
+-- !query 84
+SELECT cast(1 as tinyint)                         - '1' FROM t
+-- !query 84 schema
+struct<(CAST(CAST(1 AS TINYINT) AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 84 output
+0.0
+
+
+-- !query 85
+SELECT cast(1 as smallint)                        - '1' FROM t
+-- !query 85 schema
+struct<(CAST(CAST(1 AS SMALLINT) AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 85 output
+0.0
+
+
+-- !query 86
+SELECT cast(1 as int)                             - '1' FROM t
+-- !query 86 schema
+struct<(CAST(CAST(1 AS INT) AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 86 output
+0.0
+
+
+-- !query 87
+SELECT cast(1 as bigint)                          - '1' FROM t
+-- !query 87 schema
+struct<(CAST(CAST(1 AS BIGINT) AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 87 output
+0.0
+
+
+-- !query 88
+SELECT cast(1 as float)                           - '1' FROM t
+-- !query 88 schema
+struct<(CAST(CAST(1 AS FLOAT) AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 88 output
+0.0
+
+
+-- !query 89
+SELECT cast(1 as double)                          - '1' FROM t
+-- !query 89 schema
+struct<(CAST(1 AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 89 output
+0.0
+
+
+-- !query 90
+SELECT cast(1 as decimal(10, 0))                  - '1' FROM t
+-- !query 90 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) - CAST(1 AS DOUBLE)):double>
+-- !query 90 output
+0.0
+
+
+-- !query 91
+SELECT cast('1' as binary)                        - '1' FROM t
+-- !query 91 schema
+struct<>
+-- !query 91 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS BINARY) - CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST('1' AS BINARY) - CAST('1' AS DOUBLE))' 
(binary and double).; line 1 pos 7
+
+
+-- !query 92
+SELECT cast(1 as boolean)                         - '1' FROM t
+-- !query 92 schema
+struct<>
+-- !query 92 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST(1 AS BOOLEAN) - CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST(1 AS BOOLEAN) - CAST('1' AS DOUBLE))' 
(boolean and double).; line 1 pos 7
+
+
+-- !query 93
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) - '1' FROM t
+-- !query 93 schema
+struct<>
+-- !query 93 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00.0' AS TIMESTAMP) - CAST('1' AS 
DOUBLE))' due to data type mismatch: differing types in '(CAST('2017-12-11 
09:30:00.0' AS TIMESTAMP) - CAST('1' AS DOUBLE))' (timestamp and double).; line 
1 pos 7
+
+
+-- !query 94
+SELECT cast('2017-12-11 09:30:00' as date)        - '1' FROM t
+-- !query 94 schema
+struct<>
+-- !query 94 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00' AS DATE) - CAST('1' AS DOUBLE))' 
due to data type mismatch: differing types in '(CAST('2017-12-11 09:30:00' AS 
DATE) - CAST('1' AS DOUBLE))' (date and double).; line 1 pos 7
+
+
+-- !query 95
+SELECT cast(1 as tinyint)                         * '1' FROM t
+-- !query 95 schema
+struct<(CAST(CAST(1 AS TINYINT) AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 95 output
+1.0
+
+
+-- !query 96
+SELECT cast(1 as smallint)                        * '1' FROM t
+-- !query 96 schema
+struct<(CAST(CAST(1 AS SMALLINT) AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 96 output
+1.0
+
+
+-- !query 97
+SELECT cast(1 as int)                             * '1' FROM t
+-- !query 97 schema
+struct<(CAST(CAST(1 AS INT) AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 97 output
+1.0
+
+
+-- !query 98
+SELECT cast(1 as bigint)                          * '1' FROM t
+-- !query 98 schema
+struct<(CAST(CAST(1 AS BIGINT) AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 98 output
+1.0
+
+
+-- !query 99
+SELECT cast(1 as float)                           * '1' FROM t
+-- !query 99 schema
+struct<(CAST(CAST(1 AS FLOAT) AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 99 output
+1.0
+
+
+-- !query 100
+SELECT cast(1 as double)                          * '1' FROM t
+-- !query 100 schema
+struct<(CAST(1 AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 100 output
+1.0
+
+
+-- !query 101
+SELECT cast(1 as decimal(10, 0))                  * '1' FROM t
+-- !query 101 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) * CAST(1 AS DOUBLE)):double>
+-- !query 101 output
+1.0
+
+
+-- !query 102
+SELECT cast('1' as binary)                        * '1' FROM t
+-- !query 102 schema
+struct<>
+-- !query 102 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS BINARY) * CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST('1' AS BINARY) * CAST('1' AS DOUBLE))' 
(binary and double).; line 1 pos 7
+
+
+-- !query 103
+SELECT cast(1 as boolean)                         * '1' FROM t
+-- !query 103 schema
+struct<>
+-- !query 103 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST(1 AS BOOLEAN) * CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST(1 AS BOOLEAN) * CAST('1' AS DOUBLE))' 
(boolean and double).; line 1 pos 7
+
+
+-- !query 104
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) * '1' FROM t
+-- !query 104 schema
+struct<>
+-- !query 104 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00.0' AS TIMESTAMP) * CAST('1' AS 
DOUBLE))' due to data type mismatch: differing types in '(CAST('2017-12-11 
09:30:00.0' AS TIMESTAMP) * CAST('1' AS DOUBLE))' (timestamp and double).; line 
1 pos 7
+
+
+-- !query 105
+SELECT cast('2017-12-11 09:30:00' as date)        * '1' FROM t
+-- !query 105 schema
+struct<>
+-- !query 105 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00' AS DATE) * CAST('1' AS DOUBLE))' 
due to data type mismatch: differing types in '(CAST('2017-12-11 09:30:00' AS 
DATE) * CAST('1' AS DOUBLE))' (date and double).; line 1 pos 7
+
+
+-- !query 106
+SELECT cast(1 as tinyint)                         / '1' FROM t
+-- !query 106 schema
+struct<(CAST(CAST(1 AS TINYINT) AS DOUBLE) / CAST(CAST(1 AS DOUBLE) AS 
DOUBLE)):double>
+-- !query 106 output
+1.0
+
+
+-- !query 107
+SELECT cast(1 as smallint)                        / '1' FROM t
+-- !query 107 schema
+struct<(CAST(CAST(1 AS SMALLINT) AS DOUBLE) / CAST(CAST(1 AS DOUBLE) AS 
DOUBLE)):double>
+-- !query 107 output
+1.0
+
+
+-- !query 108
+SELECT cast(1 as int)                             / '1' FROM t
+-- !query 108 schema
+struct<(CAST(CAST(1 AS INT) AS DOUBLE) / CAST(CAST(1 AS DOUBLE) AS 
DOUBLE)):double>
+-- !query 108 output
+1.0
+
+
+-- !query 109
+SELECT cast(1 as bigint)                          / '1' FROM t
+-- !query 109 schema
+struct<(CAST(CAST(1 AS BIGINT) AS DOUBLE) / CAST(CAST(1 AS DOUBLE) AS 
DOUBLE)):double>
+-- !query 109 output
+1.0
+
+
+-- !query 110
+SELECT cast(1 as float)                           / '1' FROM t
+-- !query 110 schema
+struct<(CAST(CAST(1 AS FLOAT) AS DOUBLE) / CAST(CAST(1 AS DOUBLE) AS 
DOUBLE)):double>
+-- !query 110 output
+1.0
+
+
+-- !query 111
+SELECT cast(1 as double)                          / '1' FROM t
+-- !query 111 schema
+struct<(CAST(1 AS DOUBLE) / CAST(1 AS DOUBLE)):double>
+-- !query 111 output
+1.0
+
+
+-- !query 112
+SELECT cast(1 as decimal(10, 0))                  / '1' FROM t
+-- !query 112 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) / CAST(1 AS DOUBLE)):double>
+-- !query 112 output
+1.0
+
+
+-- !query 113
+SELECT cast('1' as binary)                        / '1' FROM t
+-- !query 113 schema
+struct<>
+-- !query 113 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS BINARY) / CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST('1' AS BINARY) / CAST('1' AS DOUBLE))' 
(binary and double).; line 1 pos 7
+
+
+-- !query 114
+SELECT cast(1 as boolean)                         / '1' FROM t
+-- !query 114 schema
+struct<>
+-- !query 114 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST(1 AS BOOLEAN) / CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST(1 AS BOOLEAN) / CAST('1' AS DOUBLE))' 
(boolean and double).; line 1 pos 7
+
+
+-- !query 115
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) / '1' FROM t
+-- !query 115 schema
+struct<>
+-- !query 115 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00.0' AS TIMESTAMP) / CAST('1' AS 
DOUBLE))' due to data type mismatch: differing types in '(CAST('2017-12-11 
09:30:00.0' AS TIMESTAMP) / CAST('1' AS DOUBLE))' (timestamp and double).; line 
1 pos 7
+
+
+-- !query 116
+SELECT cast('2017-12-11 09:30:00' as date)        / '1' FROM t
+-- !query 116 schema
+struct<>
+-- !query 116 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00' AS DATE) / CAST('1' AS DOUBLE))' 
due to data type mismatch: differing types in '(CAST('2017-12-11 09:30:00' AS 
DATE) / CAST('1' AS DOUBLE))' (date and double).; line 1 pos 7
+
+
+-- !query 117
+SELECT cast(1 as tinyint)                         % '1' FROM t
+-- !query 117 schema
+struct<(CAST(CAST(1 AS TINYINT) AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 117 output
+0.0
+
+
+-- !query 118
+SELECT cast(1 as smallint)                        % '1' FROM t
+-- !query 118 schema
+struct<(CAST(CAST(1 AS SMALLINT) AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 118 output
+0.0
+
+
+-- !query 119
+SELECT cast(1 as int)                             % '1' FROM t
+-- !query 119 schema
+struct<(CAST(CAST(1 AS INT) AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 119 output
+0.0
+
+
+-- !query 120
+SELECT cast(1 as bigint)                          % '1' FROM t
+-- !query 120 schema
+struct<(CAST(CAST(1 AS BIGINT) AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 120 output
+0.0
+
+
+-- !query 121
+SELECT cast(1 as float)                           % '1' FROM t
+-- !query 121 schema
+struct<(CAST(CAST(1 AS FLOAT) AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 121 output
+0.0
+
+
+-- !query 122
+SELECT cast(1 as double)                          % '1' FROM t
+-- !query 122 schema
+struct<(CAST(1 AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 122 output
+0.0
+
+
+-- !query 123
+SELECT cast(1 as decimal(10, 0))                  % '1' FROM t
+-- !query 123 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) % CAST(1 AS DOUBLE)):double>
+-- !query 123 output
+0.0
+
+
+-- !query 124
+SELECT cast('1' as binary)                        % '1' FROM t
+-- !query 124 schema
+struct<>
+-- !query 124 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('1' AS BINARY) % CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST('1' AS BINARY) % CAST('1' AS DOUBLE))' 
(binary and double).; line 1 pos 7
+
+
+-- !query 125
+SELECT cast(1 as boolean)                         % '1' FROM t
+-- !query 125 schema
+struct<>
+-- !query 125 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST(1 AS BOOLEAN) % CAST('1' AS DOUBLE))' due to data type 
mismatch: differing types in '(CAST(1 AS BOOLEAN) % CAST('1' AS DOUBLE))' 
(boolean and double).; line 1 pos 7
+
+
+-- !query 126
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) % '1' FROM t
+-- !query 126 schema
+struct<>
+-- !query 126 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00.0' AS TIMESTAMP) % CAST('1' AS 
DOUBLE))' due to data type mismatch: differing types in '(CAST('2017-12-11 
09:30:00.0' AS TIMESTAMP) % CAST('1' AS DOUBLE))' (timestamp and double).; line 
1 pos 7
+
+
+-- !query 127
+SELECT cast('2017-12-11 09:30:00' as date)        % '1' FROM t
+-- !query 127 schema
+struct<>
+-- !query 127 output
+org.apache.spark.sql.AnalysisException
+cannot resolve '(CAST('2017-12-11 09:30:00' AS DATE) % CAST('1' AS DOUBLE))' 
due to data type mismatch: differing types in '(CAST('2017-12-11 09:30:00' AS 
DATE) % CAST('1' AS DOUBLE))' (date and double).; line 1 pos 7
+
+
+-- !query 128
+SELECT pmod(cast(1 as tinyint), '1')                         FROM t
+-- !query 128 schema
+struct<pmod(CAST(CAST(1 AS TINYINT) AS DOUBLE), CAST(1 AS DOUBLE)):double>
+-- !query 128 output
+0.0
+
+
+-- !query 129
+SELECT pmod(cast(1 as smallint), '1')                        FROM t
+-- !query 129 schema
+struct<pmod(CAST(CAST(1 AS SMALLINT) AS DOUBLE), CAST(1 AS DOUBLE)):double>
+-- !query 129 output
+0.0
+
+
+-- !query 130
+SELECT pmod(cast(1 as int), '1')                             FROM t
+-- !query 130 schema
+struct<pmod(CAST(CAST(1 AS INT) AS DOUBLE), CAST(1 AS DOUBLE)):double>
+-- !query 130 output
+0.0
+
+
+-- !query 131
+SELECT pmod(cast(1 as bigint), '1')                          FROM t
+-- !query 131 schema
+struct<pmod(CAST(CAST(1 AS BIGINT) AS DOUBLE), CAST(1 AS DOUBLE)):double>
+-- !query 131 output
+0.0
+
+
+-- !query 132
+SELECT pmod(cast(1 as float), '1')                           FROM t
+-- !query 132 schema
+struct<pmod(CAST(CAST(1 AS FLOAT) AS DOUBLE), CAST(1 AS DOUBLE)):double>
+-- !query 132 output
+0.0
+
+
+-- !query 133
+SELECT pmod(cast(1 as double), '1')                          FROM t
+-- !query 133 schema
+struct<pmod(CAST(1 AS DOUBLE), CAST(1 AS DOUBLE)):double>
+-- !query 133 output
+0.0
+
+
+-- !query 134
+SELECT pmod(cast(1 as decimal(10, 0)), '1')                  FROM t
+-- !query 134 schema
+struct<pmod(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE), CAST(1 AS 
DOUBLE)):double>
+-- !query 134 output
+0.0
+
+
+-- !query 135
+SELECT pmod(cast('1' as binary), '1')                        FROM t
+-- !query 135 schema
+struct<>
+-- !query 135 output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'pmod(CAST('1' AS BINARY), CAST('1' AS DOUBLE))' due to data 
type mismatch: differing types in 'pmod(CAST('1' AS BINARY), CAST('1' AS 
DOUBLE))' (binary and double).; line 1 pos 7
+
+
+-- !query 136
+SELECT pmod(cast(1 as boolean), '1')                         FROM t
+-- !query 136 schema
+struct<>
+-- !query 136 output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'pmod(CAST(1 AS BOOLEAN), CAST('1' AS DOUBLE))' due to data 
type mismatch: differing types in 'pmod(CAST(1 AS BOOLEAN), CAST('1' AS 
DOUBLE))' (boolean and double).; line 1 pos 7
+
+
+-- !query 137
+SELECT pmod(cast('2017-12-11 09:30:00.0' as timestamp), '1') FROM t
+-- !query 137 schema
+struct<>
+-- !query 137 output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'pmod(CAST('2017-12-11 09:30:00.0' AS TIMESTAMP), CAST('1' AS 
DOUBLE))' due to data type mismatch: differing types in 'pmod(CAST('2017-12-11 
09:30:00.0' AS TIMESTAMP), CAST('1' AS DOUBLE))' (timestamp and double).; line 
1 pos 7
+
+
+-- !query 138
+SELECT pmod(cast('2017-12-11 09:30:00' as date), '1')        FROM t
+-- !query 138 schema
+struct<>
+-- !query 138 output
+org.apache.spark.sql.AnalysisException
+cannot resolve 'pmod(CAST('2017-12-11 09:30:00' AS DATE), CAST('1' AS 
DOUBLE))' due to data type mismatch: differing types in 'pmod(CAST('2017-12-11 
09:30:00' AS DATE), CAST('1' AS DOUBLE))' (date and double).; line 1 pos 7
+
+
+-- !query 139
+SELECT '1' = cast(1 as tinyint)                         FROM t
+-- !query 139 schema
+struct<(CAST(1 AS TINYINT) = CAST(1 AS TINYINT)):boolean>
+-- !query 139 output
+true
+
+
+-- !query 140
+SELECT '1' = cast(1 as smallint)                        FROM t
+-- !query 140 schema
+struct<(CAST(1 AS SMALLINT) = CAST(1 AS SMALLINT)):boolean>
+-- !query 140 output
+true
+
+
+-- !query 141
+SELECT '1' = cast(1 as int)                             FROM t
+-- !query 141 schema
+struct<(CAST(1 AS INT) = CAST(1 AS INT)):boolean>
+-- !query 141 output
+true
+
+
+-- !query 142
+SELECT '1' = cast(1 as bigint)                          FROM t
+-- !query 142 schema
+struct<(CAST(1 AS BIGINT) = CAST(1 AS BIGINT)):boolean>
+-- !query 142 output
+true
+
+
+-- !query 143
+SELECT '1' = cast(1 as float)                           FROM t
+-- !query 143 schema
+struct<(CAST(1 AS FLOAT) = CAST(1 AS FLOAT)):boolean>
+-- !query 143 output
+true
+
+
+-- !query 144
+SELECT '1' = cast(1 as double)                          FROM t
+-- !query 144 schema
+struct<(CAST(1 AS DOUBLE) = CAST(1 AS DOUBLE)):boolean>
+-- !query 144 output
+true
+
+
+-- !query 145
+SELECT '1' = cast(1 as decimal(10, 0))                  FROM t
+-- !query 145 schema
+struct<(CAST(1 AS DOUBLE) = CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):boolean>
+-- !query 145 output
+true
+
+
+-- !query 146
+SELECT '1' = '1'                                        FROM t
+-- !query 146 schema
+struct<(1 = 1):boolean>
+-- !query 146 output
+true
+
+
+-- !query 147
+SELECT '1' = cast('1' as binary)                        FROM t
+-- !query 147 schema
+struct<(CAST(1 AS BINARY) = CAST(1 AS BINARY)):boolean>
+-- !query 147 output
+true
+
+
+-- !query 148
+SELECT '1' = cast(1 as boolean)                         FROM t
+-- !query 148 schema
+struct<(CAST(1 AS BOOLEAN) = CAST(1 AS BOOLEAN)):boolean>
+-- !query 148 output
+true
+
+
+-- !query 149
+SELECT '1' = cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 149 schema
+struct<(CAST(1 AS TIMESTAMP) = CAST(2017-12-11 09:30:00.0 AS 
TIMESTAMP)):boolean>
+-- !query 149 output
+NULL
+
+
+-- !query 150
+SELECT '1' = cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 150 schema
+struct<(1 = CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING)):boolean>
+-- !query 150 output
+false
+
+
+-- !query 151
+SELECT cast(1 as tinyint)                         = '1' FROM t
+-- !query 151 schema
+struct<(CAST(1 AS TINYINT) = CAST(1 AS TINYINT)):boolean>
+-- !query 151 output
+true
+
+
+-- !query 152
+SELECT cast(1 as smallint)                        = '1' FROM t
+-- !query 152 schema
+struct<(CAST(1 AS SMALLINT) = CAST(1 AS SMALLINT)):boolean>
+-- !query 152 output
+true
+
+
+-- !query 153
+SELECT cast(1 as int)                             = '1' FROM t
+-- !query 153 schema
+struct<(CAST(1 AS INT) = CAST(1 AS INT)):boolean>
+-- !query 153 output
+true
+
+
+-- !query 154
+SELECT cast(1 as bigint)                          = '1' FROM t
+-- !query 154 schema
+struct<(CAST(1 AS BIGINT) = CAST(1 AS BIGINT)):boolean>
+-- !query 154 output
+true
+
+
+-- !query 155
+SELECT cast(1 as float)                           = '1' FROM t
+-- !query 155 schema
+struct<(CAST(1 AS FLOAT) = CAST(1 AS FLOAT)):boolean>
+-- !query 155 output
+true
+
+
+-- !query 156
+SELECT cast(1 as double)                          = '1' FROM t
+-- !query 156 schema
+struct<(CAST(1 AS DOUBLE) = CAST(1 AS DOUBLE)):boolean>
+-- !query 156 output
+true
+
+
+-- !query 157
+SELECT cast(1 as decimal(10, 0))                  = '1' FROM t
+-- !query 157 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) = CAST(1 AS DOUBLE)):boolean>
+-- !query 157 output
+true
+
+
+-- !query 158
+SELECT cast('1' as binary)                        = '1' FROM t
+-- !query 158 schema
+struct<(CAST(1 AS BINARY) = CAST(1 AS BINARY)):boolean>
+-- !query 158 output
+true
+
+
+-- !query 159
+SELECT cast(1 as boolean)                         = '1' FROM t
+-- !query 159 schema
+struct<(CAST(1 AS BOOLEAN) = CAST(1 AS BOOLEAN)):boolean>
+-- !query 159 output
+true
+
+
+-- !query 160
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) = '1' FROM t
+-- !query 160 schema
+struct<(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) = CAST(1 AS 
TIMESTAMP)):boolean>
+-- !query 160 output
+NULL
+
+
+-- !query 161
+SELECT cast('2017-12-11 09:30:00' as date)        = '1' FROM t
+-- !query 161 schema
+struct<(CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING) = 1):boolean>
+-- !query 161 output
+false
+
+
+-- !query 162
+SELECT '1' <=> cast(1 as tinyint)                         FROM t
+-- !query 162 schema
+struct<(CAST(1 AS TINYINT) <=> CAST(1 AS TINYINT)):boolean>
+-- !query 162 output
+true
+
+
+-- !query 163
+SELECT '1' <=> cast(1 as smallint)                        FROM t
+-- !query 163 schema
+struct<(CAST(1 AS SMALLINT) <=> CAST(1 AS SMALLINT)):boolean>
+-- !query 163 output
+true
+
+
+-- !query 164
+SELECT '1' <=> cast(1 as int)                             FROM t
+-- !query 164 schema
+struct<(CAST(1 AS INT) <=> CAST(1 AS INT)):boolean>
+-- !query 164 output
+true
+
+
+-- !query 165
+SELECT '1' <=> cast(1 as bigint)                          FROM t
+-- !query 165 schema
+struct<(CAST(1 AS BIGINT) <=> CAST(1 AS BIGINT)):boolean>
+-- !query 165 output
+true
+
+
+-- !query 166
+SELECT '1' <=> cast(1 as float)                           FROM t
+-- !query 166 schema
+struct<(CAST(1 AS FLOAT) <=> CAST(1 AS FLOAT)):boolean>
+-- !query 166 output
+true
+
+
+-- !query 167
+SELECT '1' <=> cast(1 as double)                          FROM t
+-- !query 167 schema
+struct<(CAST(1 AS DOUBLE) <=> CAST(1 AS DOUBLE)):boolean>
+-- !query 167 output
+true
+
+
+-- !query 168
+SELECT '1' <=> cast(1 as decimal(10, 0))                  FROM t
+-- !query 168 schema
+struct<(CAST(1 AS DOUBLE) <=> CAST(CAST(1 AS DECIMAL(10,0)) AS 
DOUBLE)):boolean>
+-- !query 168 output
+true
+
+
+-- !query 169
+SELECT '1' <=> '1'                                        FROM t
+-- !query 169 schema
+struct<(1 <=> 1):boolean>
+-- !query 169 output
+true
+
+
+-- !query 170
+SELECT '1' <=> cast('1' as binary)                        FROM t
+-- !query 170 schema
+struct<(CAST(1 AS BINARY) <=> CAST(1 AS BINARY)):boolean>
+-- !query 170 output
+true
+
+
+-- !query 171
+SELECT '1' <=> cast(1 as boolean)                         FROM t
+-- !query 171 schema
+struct<(CAST(1 AS BOOLEAN) <=> CAST(1 AS BOOLEAN)):boolean>
+-- !query 171 output
+true
+
+
+-- !query 172
+SELECT '1' <=> cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 172 schema
+struct<(CAST(1 AS TIMESTAMP) <=> CAST(2017-12-11 09:30:00.0 AS 
TIMESTAMP)):boolean>
+-- !query 172 output
+false
+
+
+-- !query 173
+SELECT '1' <=> cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 173 schema
+struct<(1 <=> CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING)):boolean>
+-- !query 173 output
+false
+
+
+-- !query 174
+SELECT cast(1 as tinyint)                         <=> '1' FROM t
+-- !query 174 schema
+struct<(CAST(1 AS TINYINT) <=> CAST(1 AS TINYINT)):boolean>
+-- !query 174 output
+true
+
+
+-- !query 175
+SELECT cast(1 as smallint)                        <=> '1' FROM t
+-- !query 175 schema
+struct<(CAST(1 AS SMALLINT) <=> CAST(1 AS SMALLINT)):boolean>
+-- !query 175 output
+true
+
+
+-- !query 176
+SELECT cast(1 as int)                             <=> '1' FROM t
+-- !query 176 schema
+struct<(CAST(1 AS INT) <=> CAST(1 AS INT)):boolean>
+-- !query 176 output
+true
+
+
+-- !query 177
+SELECT cast(1 as bigint)                          <=> '1' FROM t
+-- !query 177 schema
+struct<(CAST(1 AS BIGINT) <=> CAST(1 AS BIGINT)):boolean>
+-- !query 177 output
+true
+
+
+-- !query 178
+SELECT cast(1 as float)                           <=> '1' FROM t
+-- !query 178 schema
+struct<(CAST(1 AS FLOAT) <=> CAST(1 AS FLOAT)):boolean>
+-- !query 178 output
+true
+
+
+-- !query 179
+SELECT cast(1 as double)                          <=> '1' FROM t
+-- !query 179 schema
+struct<(CAST(1 AS DOUBLE) <=> CAST(1 AS DOUBLE)):boolean>
+-- !query 179 output
+true
+
+
+-- !query 180
+SELECT cast(1 as decimal(10, 0))                  <=> '1' FROM t
+-- !query 180 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) <=> CAST(1 AS 
DOUBLE)):boolean>
+-- !query 180 output
+true
+
+
+-- !query 181
+SELECT cast('1' as binary)                        <=> '1' FROM t
+-- !query 181 schema
+struct<(CAST(1 AS BINARY) <=> CAST(1 AS BINARY)):boolean>
+-- !query 181 output
+true
+
+
+-- !query 182
+SELECT cast(1 as boolean)                         <=> '1' FROM t
+-- !query 182 schema
+struct<(CAST(1 AS BOOLEAN) <=> CAST(1 AS BOOLEAN)):boolean>
+-- !query 182 output
+true
+
+
+-- !query 183
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) <=> '1' FROM t
+-- !query 183 schema
+struct<(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) <=> CAST(1 AS 
TIMESTAMP)):boolean>
+-- !query 183 output
+false
+
+
+-- !query 184
+SELECT cast('2017-12-11 09:30:00' as date)        <=> '1' FROM t
+-- !query 184 schema
+struct<(CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING) <=> 1):boolean>
+-- !query 184 output
+false
+
+
+-- !query 185
+SELECT '1' < cast(1 as tinyint)                         FROM t
+-- !query 185 schema
+struct<(CAST(1 AS TINYINT) < CAST(1 AS TINYINT)):boolean>
+-- !query 185 output
+false
+
+
+-- !query 186
+SELECT '1' < cast(1 as smallint)                        FROM t
+-- !query 186 schema
+struct<(CAST(1 AS SMALLINT) < CAST(1 AS SMALLINT)):boolean>
+-- !query 186 output
+false
+
+
+-- !query 187
+SELECT '1' < cast(1 as int)                             FROM t
+-- !query 187 schema
+struct<(CAST(1 AS INT) < CAST(1 AS INT)):boolean>
+-- !query 187 output
+false
+
+
+-- !query 188
+SELECT '1' < cast(1 as bigint)                          FROM t
+-- !query 188 schema
+struct<(CAST(1 AS BIGINT) < CAST(1 AS BIGINT)):boolean>
+-- !query 188 output
+false
+
+
+-- !query 189
+SELECT '1' < cast(1 as float)                           FROM t
+-- !query 189 schema
+struct<(CAST(1 AS FLOAT) < CAST(1 AS FLOAT)):boolean>
+-- !query 189 output
+false
+
+
+-- !query 190
+SELECT '1' < cast(1 as double)                          FROM t
+-- !query 190 schema
+struct<(CAST(1 AS DOUBLE) < CAST(1 AS DOUBLE)):boolean>
+-- !query 190 output
+false
+
+
+-- !query 191
+SELECT '1' < cast(1 as decimal(10, 0))                  FROM t
+-- !query 191 schema
+struct<(CAST(1 AS DOUBLE) < CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):boolean>
+-- !query 191 output
+false
+
+
+-- !query 192
+SELECT '1' < '1'                                        FROM t
+-- !query 192 schema
+struct<(1 < 1):boolean>
+-- !query 192 output
+false
+
+
+-- !query 193
+SELECT '1' < cast('1' as binary)                        FROM t
+-- !query 193 schema
+struct<(CAST(1 AS BINARY) < CAST(1 AS BINARY)):boolean>
+-- !query 193 output
+false
+
+
+-- !query 194
+SELECT '1' < cast(1 as boolean)                         FROM t
+-- !query 194 schema
+struct<(CAST(1 AS BOOLEAN) < CAST(1 AS BOOLEAN)):boolean>
+-- !query 194 output
+false
+
+
+-- !query 195
+SELECT '1' < cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 195 schema
+struct<(1 < CAST(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) AS STRING)):boolean>
+-- !query 195 output
+true
+
+
+-- !query 196
+SELECT '1' < cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 196 schema
+struct<(1 < CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING)):boolean>
+-- !query 196 output
+true
+
+
+-- !query 197
+SELECT '1' <= cast(1 as tinyint)                         FROM t
+-- !query 197 schema
+struct<(CAST(1 AS TINYINT) <= CAST(1 AS TINYINT)):boolean>
+-- !query 197 output
+true
+
+
+-- !query 198
+SELECT '1' <= cast(1 as smallint)                        FROM t
+-- !query 198 schema
+struct<(CAST(1 AS SMALLINT) <= CAST(1 AS SMALLINT)):boolean>
+-- !query 198 output
+true
+
+
+-- !query 199
+SELECT '1' <= cast(1 as int)                             FROM t
+-- !query 199 schema
+struct<(CAST(1 AS INT) <= CAST(1 AS INT)):boolean>
+-- !query 199 output
+true
+
+
+-- !query 200
+SELECT '1' <= cast(1 as bigint)                          FROM t
+-- !query 200 schema
+struct<(CAST(1 AS BIGINT) <= CAST(1 AS BIGINT)):boolean>
+-- !query 200 output
+true
+
+
+-- !query 201
+SELECT '1' <= cast(1 as float)                           FROM t
+-- !query 201 schema
+struct<(CAST(1 AS FLOAT) <= CAST(1 AS FLOAT)):boolean>
+-- !query 201 output
+true
+
+
+-- !query 202
+SELECT '1' <= cast(1 as double)                          FROM t
+-- !query 202 schema
+struct<(CAST(1 AS DOUBLE) <= CAST(1 AS DOUBLE)):boolean>
+-- !query 202 output
+true
+
+
+-- !query 203
+SELECT '1' <= cast(1 as decimal(10, 0))                  FROM t
+-- !query 203 schema
+struct<(CAST(1 AS DOUBLE) <= CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):boolean>
+-- !query 203 output
+true
+
+
+-- !query 204
+SELECT '1' <= '1'                                        FROM t
+-- !query 204 schema
+struct<(1 <= 1):boolean>
+-- !query 204 output
+true
+
+
+-- !query 205
+SELECT '1' <= cast('1' as binary)                        FROM t
+-- !query 205 schema
+struct<(CAST(1 AS BINARY) <= CAST(1 AS BINARY)):boolean>
+-- !query 205 output
+true
+
+
+-- !query 206
+SELECT '1' <= cast(1 as boolean)                         FROM t
+-- !query 206 schema
+struct<(CAST(1 AS BOOLEAN) <= CAST(1 AS BOOLEAN)):boolean>
+-- !query 206 output
+true
+
+
+-- !query 207
+SELECT '1' <= cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 207 schema
+struct<(1 <= CAST(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) AS STRING)):boolean>
+-- !query 207 output
+true
+
+
+-- !query 208
+SELECT '1' <= cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 208 schema
+struct<(1 <= CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING)):boolean>
+-- !query 208 output
+true
+
+
+-- !query 209
+SELECT '1' > cast(1 as tinyint)                         FROM t
+-- !query 209 schema
+struct<(CAST(1 AS TINYINT) > CAST(1 AS TINYINT)):boolean>
+-- !query 209 output
+false
+
+
+-- !query 210
+SELECT '1' > cast(1 as smallint)                        FROM t
+-- !query 210 schema
+struct<(CAST(1 AS SMALLINT) > CAST(1 AS SMALLINT)):boolean>
+-- !query 210 output
+false
+
+
+-- !query 211
+SELECT '1' > cast(1 as int)                             FROM t
+-- !query 211 schema
+struct<(CAST(1 AS INT) > CAST(1 AS INT)):boolean>
+-- !query 211 output
+false
+
+
+-- !query 212
+SELECT '1' > cast(1 as bigint)                          FROM t
+-- !query 212 schema
+struct<(CAST(1 AS BIGINT) > CAST(1 AS BIGINT)):boolean>
+-- !query 212 output
+false
+
+
+-- !query 213
+SELECT '1' > cast(1 as float)                           FROM t
+-- !query 213 schema
+struct<(CAST(1 AS FLOAT) > CAST(1 AS FLOAT)):boolean>
+-- !query 213 output
+false
+
+
+-- !query 214
+SELECT '1' > cast(1 as double)                          FROM t
+-- !query 214 schema
+struct<(CAST(1 AS DOUBLE) > CAST(1 AS DOUBLE)):boolean>
+-- !query 214 output
+false
+
+
+-- !query 215
+SELECT '1' > cast(1 as decimal(10, 0))                  FROM t
+-- !query 215 schema
+struct<(CAST(1 AS DOUBLE) > CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):boolean>
+-- !query 215 output
+false
+
+
+-- !query 216
+SELECT '1' > '1'                                        FROM t
+-- !query 216 schema
+struct<(1 > 1):boolean>
+-- !query 216 output
+false
+
+
+-- !query 217
+SELECT '1' > cast('1' as binary)                        FROM t
+-- !query 217 schema
+struct<(CAST(1 AS BINARY) > CAST(1 AS BINARY)):boolean>
+-- !query 217 output
+false
+
+
+-- !query 218
+SELECT '1' > cast(1 as boolean)                         FROM t
+-- !query 218 schema
+struct<(CAST(1 AS BOOLEAN) > CAST(1 AS BOOLEAN)):boolean>
+-- !query 218 output
+false
+
+
+-- !query 219
+SELECT '1' > cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 219 schema
+struct<(1 > CAST(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) AS STRING)):boolean>
+-- !query 219 output
+false
+
+
+-- !query 220
+SELECT '1' > cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 220 schema
+struct<(1 > CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING)):boolean>
+-- !query 220 output
+false
+
+
+-- !query 221
+SELECT '1' >= cast(1 as tinyint)                         FROM t
+-- !query 221 schema
+struct<(CAST(1 AS TINYINT) >= CAST(1 AS TINYINT)):boolean>
+-- !query 221 output
+true
+
+
+-- !query 222
+SELECT '1' >= cast(1 as smallint)                        FROM t
+-- !query 222 schema
+struct<(CAST(1 AS SMALLINT) >= CAST(1 AS SMALLINT)):boolean>
+-- !query 222 output
+true
+
+
+-- !query 223
+SELECT '1' >= cast(1 as int)                             FROM t
+-- !query 223 schema
+struct<(CAST(1 AS INT) >= CAST(1 AS INT)):boolean>
+-- !query 223 output
+true
+
+
+-- !query 224
+SELECT '1' >= cast(1 as bigint)                          FROM t
+-- !query 224 schema
+struct<(CAST(1 AS BIGINT) >= CAST(1 AS BIGINT)):boolean>
+-- !query 224 output
+true
+
+
+-- !query 225
+SELECT '1' >= cast(1 as float)                           FROM t
+-- !query 225 schema
+struct<(CAST(1 AS FLOAT) >= CAST(1 AS FLOAT)):boolean>
+-- !query 225 output
+true
+
+
+-- !query 226
+SELECT '1' >= cast(1 as double)                          FROM t
+-- !query 226 schema
+struct<(CAST(1 AS DOUBLE) >= CAST(1 AS DOUBLE)):boolean>
+-- !query 226 output
+true
+
+
+-- !query 227
+SELECT '1' >= cast(1 as decimal(10, 0))                  FROM t
+-- !query 227 schema
+struct<(CAST(1 AS DOUBLE) >= CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE)):boolean>
+-- !query 227 output
+true
+
+
+-- !query 228
+SELECT '1' >= '1'                                        FROM t
+-- !query 228 schema
+struct<(1 >= 1):boolean>
+-- !query 228 output
+true
+
+
+-- !query 229
+SELECT '1' >= cast('1' as binary)                        FROM t
+-- !query 229 schema
+struct<(CAST(1 AS BINARY) >= CAST(1 AS BINARY)):boolean>
+-- !query 229 output
+true
+
+
+-- !query 230
+SELECT '1' >= cast(1 as boolean)                         FROM t
+-- !query 230 schema
+struct<(CAST(1 AS BOOLEAN) >= CAST(1 AS BOOLEAN)):boolean>
+-- !query 230 output
+true
+
+
+-- !query 231
+SELECT '1' >= cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 231 schema
+struct<(1 >= CAST(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) AS STRING)):boolean>
+-- !query 231 output
+false
+
+
+-- !query 232
+SELECT '1' >= cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 232 schema
+struct<(1 >= CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING)):boolean>
+-- !query 232 output
+false
+
+
+-- !query 233
+SELECT '1' <> cast(1 as tinyint)                         FROM t
+-- !query 233 schema
+struct<(NOT (CAST(1 AS TINYINT) = CAST(1 AS TINYINT))):boolean>
+-- !query 233 output
+false
+
+
+-- !query 234
+SELECT '1' <> cast(1 as smallint)                        FROM t
+-- !query 234 schema
+struct<(NOT (CAST(1 AS SMALLINT) = CAST(1 AS SMALLINT))):boolean>
+-- !query 234 output
+false
+
+
+-- !query 235
+SELECT '1' <> cast(1 as int)                             FROM t
+-- !query 235 schema
+struct<(NOT (CAST(1 AS INT) = CAST(1 AS INT))):boolean>
+-- !query 235 output
+false
+
+
+-- !query 236
+SELECT '1' <> cast(1 as bigint)                          FROM t
+-- !query 236 schema
+struct<(NOT (CAST(1 AS BIGINT) = CAST(1 AS BIGINT))):boolean>
+-- !query 236 output
+false
+
+
+-- !query 237
+SELECT '1' <> cast(1 as float)                           FROM t
+-- !query 237 schema
+struct<(NOT (CAST(1 AS FLOAT) = CAST(1 AS FLOAT))):boolean>
+-- !query 237 output
+false
+
+
+-- !query 238
+SELECT '1' <> cast(1 as double)                          FROM t
+-- !query 238 schema
+struct<(NOT (CAST(1 AS DOUBLE) = CAST(1 AS DOUBLE))):boolean>
+-- !query 238 output
+false
+
+
+-- !query 239
+SELECT '1' <> cast(1 as decimal(10, 0))                  FROM t
+-- !query 239 schema
+struct<(NOT (CAST(1 AS DOUBLE) = CAST(CAST(1 AS DECIMAL(10,0)) AS 
DOUBLE))):boolean>
+-- !query 239 output
+false
+
+
+-- !query 240
+SELECT '1' <> '1'                                        FROM t
+-- !query 240 schema
+struct<(NOT (1 = 1)):boolean>
+-- !query 240 output
+false
+
+
+-- !query 241
+SELECT '1' <> cast('1' as binary)                        FROM t
+-- !query 241 schema
+struct<(NOT (CAST(1 AS BINARY) = CAST(1 AS BINARY))):boolean>
+-- !query 241 output
+false
+
+
+-- !query 242
+SELECT '1' <> cast(1 as boolean)                         FROM t
+-- !query 242 schema
+struct<(NOT (CAST(1 AS BOOLEAN) = CAST(1 AS BOOLEAN))):boolean>
+-- !query 242 output
+false
+
+
+-- !query 243
+SELECT '1' <> cast('2017-12-11 09:30:00.0' as timestamp) FROM t
+-- !query 243 schema
+struct<(NOT (CAST(1 AS TIMESTAMP) = CAST(2017-12-11 09:30:00.0 AS 
TIMESTAMP))):boolean>
+-- !query 243 output
+NULL
+
+
+-- !query 244
+SELECT '1' <> cast('2017-12-11 09:30:00' as date)        FROM t
+-- !query 244 schema
+struct<(NOT (1 = CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING))):boolean>
+-- !query 244 output
+true
+
+
+-- !query 245
+SELECT cast(1 as tinyint)                         < '1' FROM t
+-- !query 245 schema
+struct<(CAST(1 AS TINYINT) < CAST(1 AS TINYINT)):boolean>
+-- !query 245 output
+false
+
+
+-- !query 246
+SELECT cast(1 as smallint)                        < '1' FROM t
+-- !query 246 schema
+struct<(CAST(1 AS SMALLINT) < CAST(1 AS SMALLINT)):boolean>
+-- !query 246 output
+false
+
+
+-- !query 247
+SELECT cast(1 as int)                             < '1' FROM t
+-- !query 247 schema
+struct<(CAST(1 AS INT) < CAST(1 AS INT)):boolean>
+-- !query 247 output
+false
+
+
+-- !query 248
+SELECT cast(1 as bigint)                          < '1' FROM t
+-- !query 248 schema
+struct<(CAST(1 AS BIGINT) < CAST(1 AS BIGINT)):boolean>
+-- !query 248 output
+false
+
+
+-- !query 249
+SELECT cast(1 as float)                           < '1' FROM t
+-- !query 249 schema
+struct<(CAST(1 AS FLOAT) < CAST(1 AS FLOAT)):boolean>
+-- !query 249 output
+false
+
+
+-- !query 250
+SELECT cast(1 as double)                          < '1' FROM t
+-- !query 250 schema
+struct<(CAST(1 AS DOUBLE) < CAST(1 AS DOUBLE)):boolean>
+-- !query 250 output
+false
+
+
+-- !query 251
+SELECT cast(1 as decimal(10, 0))                  < '1' FROM t
+-- !query 251 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) < CAST(1 AS DOUBLE)):boolean>
+-- !query 251 output
+false
+
+
+-- !query 252
+SELECT '1'                                        < '1' FROM t
+-- !query 252 schema
+struct<(1 < 1):boolean>
+-- !query 252 output
+false
+
+
+-- !query 253
+SELECT cast('1' as binary)                        < '1' FROM t
+-- !query 253 schema
+struct<(CAST(1 AS BINARY) < CAST(1 AS BINARY)):boolean>
+-- !query 253 output
+false
+
+
+-- !query 254
+SELECT cast(1 as boolean)                         < '1' FROM t
+-- !query 254 schema
+struct<(CAST(1 AS BOOLEAN) < CAST(1 AS BOOLEAN)):boolean>
+-- !query 254 output
+false
+
+
+-- !query 255
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) < '1' FROM t
+-- !query 255 schema
+struct<(CAST(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) AS STRING) < 1):boolean>
+-- !query 255 output
+false
+
+
+-- !query 256
+SELECT cast('2017-12-11 09:30:00' as date)        < '1' FROM t
+-- !query 256 schema
+struct<(CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING) < 1):boolean>
+-- !query 256 output
+false
+
+
+-- !query 257
+SELECT cast(1 as tinyint)                         <= '1' FROM t
+-- !query 257 schema
+struct<(CAST(1 AS TINYINT) <= CAST(1 AS TINYINT)):boolean>
+-- !query 257 output
+true
+
+
+-- !query 258
+SELECT cast(1 as smallint)                        <= '1' FROM t
+-- !query 258 schema
+struct<(CAST(1 AS SMALLINT) <= CAST(1 AS SMALLINT)):boolean>
+-- !query 258 output
+true
+
+
+-- !query 259
+SELECT cast(1 as int)                             <= '1' FROM t
+-- !query 259 schema
+struct<(CAST(1 AS INT) <= CAST(1 AS INT)):boolean>
+-- !query 259 output
+true
+
+
+-- !query 260
+SELECT cast(1 as bigint)                          <= '1' FROM t
+-- !query 260 schema
+struct<(CAST(1 AS BIGINT) <= CAST(1 AS BIGINT)):boolean>
+-- !query 260 output
+true
+
+
+-- !query 261
+SELECT cast(1 as float)                           <= '1' FROM t
+-- !query 261 schema
+struct<(CAST(1 AS FLOAT) <= CAST(1 AS FLOAT)):boolean>
+-- !query 261 output
+true
+
+
+-- !query 262
+SELECT cast(1 as double)                          <= '1' FROM t
+-- !query 262 schema
+struct<(CAST(1 AS DOUBLE) <= CAST(1 AS DOUBLE)):boolean>
+-- !query 262 output
+true
+
+
+-- !query 263
+SELECT cast(1 as decimal(10, 0))                  <= '1' FROM t
+-- !query 263 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) <= CAST(1 AS DOUBLE)):boolean>
+-- !query 263 output
+true
+
+
+-- !query 264
+SELECT '1'                                        <= '1' FROM t
+-- !query 264 schema
+struct<(1 <= 1):boolean>
+-- !query 264 output
+true
+
+
+-- !query 265
+SELECT cast('1' as binary)                        <= '1' FROM t
+-- !query 265 schema
+struct<(CAST(1 AS BINARY) <= CAST(1 AS BINARY)):boolean>
+-- !query 265 output
+true
+
+
+-- !query 266
+SELECT cast(1 as boolean)                         <= '1' FROM t
+-- !query 266 schema
+struct<(CAST(1 AS BOOLEAN) <= CAST(1 AS BOOLEAN)):boolean>
+-- !query 266 output
+true
+
+
+-- !query 267
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) <= '1' FROM t
+-- !query 267 schema
+struct<(CAST(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) AS STRING) <= 1):boolean>
+-- !query 267 output
+false
+
+
+-- !query 268
+SELECT cast('2017-12-11 09:30:00' as date)        <= '1' FROM t
+-- !query 268 schema
+struct<(CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING) <= 1):boolean>
+-- !query 268 output
+false
+
+
+-- !query 269
+SELECT cast(1 as tinyint)                         > '1' FROM t
+-- !query 269 schema
+struct<(CAST(1 AS TINYINT) > CAST(1 AS TINYINT)):boolean>
+-- !query 269 output
+false
+
+
+-- !query 270
+SELECT cast(1 as smallint)                        > '1' FROM t
+-- !query 270 schema
+struct<(CAST(1 AS SMALLINT) > CAST(1 AS SMALLINT)):boolean>
+-- !query 270 output
+false
+
+
+-- !query 271
+SELECT cast(1 as int)                             > '1' FROM t
+-- !query 271 schema
+struct<(CAST(1 AS INT) > CAST(1 AS INT)):boolean>
+-- !query 271 output
+false
+
+
+-- !query 272
+SELECT cast(1 as bigint)                          > '1' FROM t
+-- !query 272 schema
+struct<(CAST(1 AS BIGINT) > CAST(1 AS BIGINT)):boolean>
+-- !query 272 output
+false
+
+
+-- !query 273
+SELECT cast(1 as float)                           > '1' FROM t
+-- !query 273 schema
+struct<(CAST(1 AS FLOAT) > CAST(1 AS FLOAT)):boolean>
+-- !query 273 output
+false
+
+
+-- !query 274
+SELECT cast(1 as double)                          > '1' FROM t
+-- !query 274 schema
+struct<(CAST(1 AS DOUBLE) > CAST(1 AS DOUBLE)):boolean>
+-- !query 274 output
+false
+
+
+-- !query 275
+SELECT cast(1 as decimal(10, 0))                  > '1' FROM t
+-- !query 275 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) > CAST(1 AS DOUBLE)):boolean>
+-- !query 275 output
+false
+
+
+-- !query 276
+SELECT '1'                                        > '1' FROM t
+-- !query 276 schema
+struct<(1 > 1):boolean>
+-- !query 276 output
+false
+
+
+-- !query 277
+SELECT cast('1' as binary)                        > '1' FROM t
+-- !query 277 schema
+struct<(CAST(1 AS BINARY) > CAST(1 AS BINARY)):boolean>
+-- !query 277 output
+false
+
+
+-- !query 278
+SELECT cast(1 as boolean)                         > '1' FROM t
+-- !query 278 schema
+struct<(CAST(1 AS BOOLEAN) > CAST(1 AS BOOLEAN)):boolean>
+-- !query 278 output
+false
+
+
+-- !query 279
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) > '1' FROM t
+-- !query 279 schema
+struct<(CAST(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) AS STRING) > 1):boolean>
+-- !query 279 output
+true
+
+
+-- !query 280
+SELECT cast('2017-12-11 09:30:00' as date)        > '1' FROM t
+-- !query 280 schema
+struct<(CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING) > 1):boolean>
+-- !query 280 output
+true
+
+
+-- !query 281
+SELECT cast(1 as tinyint)                         >= '1' FROM t
+-- !query 281 schema
+struct<(CAST(1 AS TINYINT) >= CAST(1 AS TINYINT)):boolean>
+-- !query 281 output
+true
+
+
+-- !query 282
+SELECT cast(1 as smallint)                        >= '1' FROM t
+-- !query 282 schema
+struct<(CAST(1 AS SMALLINT) >= CAST(1 AS SMALLINT)):boolean>
+-- !query 282 output
+true
+
+
+-- !query 283
+SELECT cast(1 as int)                             >= '1' FROM t
+-- !query 283 schema
+struct<(CAST(1 AS INT) >= CAST(1 AS INT)):boolean>
+-- !query 283 output
+true
+
+
+-- !query 284
+SELECT cast(1 as bigint)                          >= '1' FROM t
+-- !query 284 schema
+struct<(CAST(1 AS BIGINT) >= CAST(1 AS BIGINT)):boolean>
+-- !query 284 output
+true
+
+
+-- !query 285
+SELECT cast(1 as float)                           >= '1' FROM t
+-- !query 285 schema
+struct<(CAST(1 AS FLOAT) >= CAST(1 AS FLOAT)):boolean>
+-- !query 285 output
+true
+
+
+-- !query 286
+SELECT cast(1 as double)                          >= '1' FROM t
+-- !query 286 schema
+struct<(CAST(1 AS DOUBLE) >= CAST(1 AS DOUBLE)):boolean>
+-- !query 286 output
+true
+
+
+-- !query 287
+SELECT cast(1 as decimal(10, 0))                  >= '1' FROM t
+-- !query 287 schema
+struct<(CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) >= CAST(1 AS DOUBLE)):boolean>
+-- !query 287 output
+true
+
+
+-- !query 288
+SELECT '1'                                        >= '1' FROM t
+-- !query 288 schema
+struct<(1 >= 1):boolean>
+-- !query 288 output
+true
+
+
+-- !query 289
+SELECT cast('1' as binary)                        >= '1' FROM t
+-- !query 289 schema
+struct<(CAST(1 AS BINARY) >= CAST(1 AS BINARY)):boolean>
+-- !query 289 output
+true
+
+
+-- !query 290
+SELECT cast(1 as boolean)                         >= '1' FROM t
+-- !query 290 schema
+struct<(CAST(1 AS BOOLEAN) >= CAST(1 AS BOOLEAN)):boolean>
+-- !query 290 output
+true
+
+
+-- !query 291
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) >= '1' FROM t
+-- !query 291 schema
+struct<(CAST(CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) AS STRING) >= 1):boolean>
+-- !query 291 output
+true
+
+
+-- !query 292
+SELECT cast('2017-12-11 09:30:00' as date)        >= '1' FROM t
+-- !query 292 schema
+struct<(CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING) >= 1):boolean>
+-- !query 292 output
+true
+
+
+-- !query 293
+SELECT cast(1 as tinyint)                         <> '1' FROM t
+-- !query 293 schema
+struct<(NOT (CAST(1 AS TINYINT) = CAST(1 AS TINYINT))):boolean>
+-- !query 293 output
+false
+
+
+-- !query 294
+SELECT cast(1 as smallint)                        <> '1' FROM t
+-- !query 294 schema
+struct<(NOT (CAST(1 AS SMALLINT) = CAST(1 AS SMALLINT))):boolean>
+-- !query 294 output
+false
+
+
+-- !query 295
+SELECT cast(1 as int)                             <> '1' FROM t
+-- !query 295 schema
+struct<(NOT (CAST(1 AS INT) = CAST(1 AS INT))):boolean>
+-- !query 295 output
+false
+
+
+-- !query 296
+SELECT cast(1 as bigint)                          <> '1' FROM t
+-- !query 296 schema
+struct<(NOT (CAST(1 AS BIGINT) = CAST(1 AS BIGINT))):boolean>
+-- !query 296 output
+false
+
+
+-- !query 297
+SELECT cast(1 as float)                           <> '1' FROM t
+-- !query 297 schema
+struct<(NOT (CAST(1 AS FLOAT) = CAST(1 AS FLOAT))):boolean>
+-- !query 297 output
+false
+
+
+-- !query 298
+SELECT cast(1 as double)                          <> '1' FROM t
+-- !query 298 schema
+struct<(NOT (CAST(1 AS DOUBLE) = CAST(1 AS DOUBLE))):boolean>
+-- !query 298 output
+false
+
+
+-- !query 299
+SELECT cast(1 as decimal(10, 0))                  <> '1' FROM t
+-- !query 299 schema
+struct<(NOT (CAST(CAST(1 AS DECIMAL(10,0)) AS DOUBLE) = CAST(1 AS 
DOUBLE))):boolean>
+-- !query 299 output
+false
+
+
+-- !query 300
+SELECT '1'                                        <> '1' FROM t
+-- !query 300 schema
+struct<(NOT (1 = 1)):boolean>
+-- !query 300 output
+false
+
+
+-- !query 301
+SELECT cast('1' as binary)                        <> '1' FROM t
+-- !query 301 schema
+struct<(NOT (CAST(1 AS BINARY) = CAST(1 AS BINARY))):boolean>
+-- !query 301 output
+false
+
+
+-- !query 302
+SELECT cast(1 as boolean)                         <> '1' FROM t
+-- !query 302 schema
+struct<(NOT (CAST(1 AS BOOLEAN) = CAST(1 AS BOOLEAN))):boolean>
+-- !query 302 output
+false
+
+
+-- !query 303
+SELECT cast('2017-12-11 09:30:00.0' as timestamp) <> '1' FROM t
+-- !query 303 schema
+struct<(NOT (CAST(2017-12-11 09:30:00.0 AS TIMESTAMP) = CAST(1 AS 
TIMESTAMP))):boolean>
+-- !query 303 output
+NULL
+
+
+-- !query 304
+SELECT cast('2017-12-11 09:30:00' as date)        <> '1' FROM t
+-- !query 304 schema
+struct<(NOT (CAST(CAST(2017-12-11 09:30:00 AS DATE) AS STRING) = 1)):boolean>
+-- !query 304 output
+true
+
+
+-- !query 305
+SELECT abs('1') FROM t
+-- !query 305 schema
+struct<abs(CAST(1 AS DOUBLE)):double>
+-- !query 305 output
+1.0
+
+
+-- !query 306
+SELECT sum('1') FROM t
+-- !query 306 schema
+struct<sum(CAST(1 AS DOUBLE)):double>
+-- !query 306 output
+1.0
+
+
+-- !query 307
+SELECT avg('1') FROM t
+-- !query 307 schema
+struct<avg(CAST(1 AS DOUBLE)):double>
+-- !query 307 output
+1.0
+
+
+-- !query 308
+SELECT stddev_pop('1') FROM t
+-- !query 308 schema
+struct<stddev_pop(CAST(1 AS DOUBLE)):double>
+-- !query 308 output
+0.0
+
+
+-- !query 309
+SELECT stddev_samp('1') FROM t
+-- !query 309 schema
+struct<stddev_samp(CAST(1 AS DOUBLE)):double>
+-- !query 309 output
+NaN
+
+
+-- !query 310
+SELECT - '1' FROM t
+-- !query 310 schema
+struct<(- CAST(1 AS DOUBLE)):double>
+-- !query 310 output
+-1.0
+
+
+-- !query 311
+SELECT + '1' FROM t
+-- !query 311 schema
+struct<1:string>
+-- !query 311 output
+1
+
+
+-- !query 312
+SELECT var_pop('1') FROM t
+-- !query 312 schema
+struct<var_pop(CAST(1 AS DOUBLE)):double>
+-- !query 312 output
+0.0
+
+
+-- !query 313
+SELECT var_samp('1') FROM t
+-- !query 313 schema
+struct<var_samp(CAST(1 AS DOUBLE)):double>
+-- !query 313 output
+NaN
+
+
+-- !query 314
+SELECT skewness('1') FROM t
+-- !query 314 schema
+struct<skewness(CAST(1 AS DOUBLE)):double>
+-- !query 314 output
+NaN
+
+
+-- !query 315
+SELECT kurtosis('1') FROM t
+-- !query 315 schema
+struct<kurtosis(CAST(1 AS DOUBLE)):double>
+-- !query 315 output
+NaN


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to