aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out
diff options
context:
space:
mode:
authorpetermaxlee <petermaxlee@gmail.com>2016-08-11 01:43:08 -0700
committerReynold Xin <rxin@databricks.com>2016-08-11 01:43:08 -0700
commita7b02db457d5fc663ce6a1ef01bf04689870e6b4 (patch)
treefd52ff812f94761adb03e9610fcc053e14a96120 /sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out
parent0db373aaf87991207a7a8a09853b6fa602f0f45b (diff)
downloadspark-a7b02db457d5fc663ce6a1ef01bf04689870e6b4.tar.gz
spark-a7b02db457d5fc663ce6a1ef01bf04689870e6b4.tar.bz2
spark-a7b02db457d5fc663ce6a1ef01bf04689870e6b4.zip
[SPARK-17015][SQL] group-by/order-by ordinal and arithmetic tests
## What changes were proposed in this pull request? This patch adds three test files: 1. arithmetic.sql.out 2. order-by-ordinal.sql 3. group-by-ordinal.sql This includes https://github.com/apache/spark/pull/14594. ## How was this patch tested? This is a test case change. Author: petermaxlee <petermaxlee@gmail.com> Closes #14595 from petermaxlee/SPARK-17015.
Diffstat (limited to 'sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out')
-rw-r--r--sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out178
1 files changed, 178 insertions, 0 deletions
diff --git a/sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out b/sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out
new file mode 100644
index 0000000000..50ea254b0b
--- /dev/null
+++ b/sql/core/src/test/resources/sql-tests/results/arithmetic.sql.out
@@ -0,0 +1,178 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 22
+
+
+-- !query 0
+select -100
+-- !query 0 schema
+struct<(-100):int>
+-- !query 0 output
+-100
+
+
+-- !query 1
+select +230
+-- !query 1 schema
+struct<230:int>
+-- !query 1 output
+230
+
+
+-- !query 2
+select -5.2
+-- !query 2 schema
+struct<(-5.2):decimal(2,1)>
+-- !query 2 output
+-5.2
+
+
+-- !query 3
+select +6.8e0
+-- !query 3 schema
+struct<6.8:double>
+-- !query 3 output
+6.8
+
+
+-- !query 4
+select -key, +key from testdata where key = 2
+-- !query 4 schema
+struct<(-key):int,key:int>
+-- !query 4 output
+-2 2
+
+
+-- !query 5
+select -(key + 1), - key + 1, +(key + 5) from testdata where key = 1
+-- !query 5 schema
+struct<(-(key + 1)):int,((-key) + 1):int,(key + 5):int>
+-- !query 5 output
+-2 0 6
+
+
+-- !query 6
+select -max(key), +max(key) from testdata
+-- !query 6 schema
+struct<(-max(key)):int,max(key):int>
+-- !query 6 output
+-100 100
+
+
+-- !query 7
+select - (-10)
+-- !query 7 schema
+struct<(-(-10)):int>
+-- !query 7 output
+10
+
+
+-- !query 8
+select + (-key) from testdata where key = 32
+-- !query 8 schema
+struct<(-key):int>
+-- !query 8 output
+-32
+
+
+-- !query 9
+select - (+max(key)) from testdata
+-- !query 9 schema
+struct<(-max(key)):int>
+-- !query 9 output
+-100
+
+
+-- !query 10
+select - - 3
+-- !query 10 schema
+struct<(-(-3)):int>
+-- !query 10 output
+3
+
+
+-- !query 11
+select - + 20
+-- !query 11 schema
+struct<(-20):int>
+-- !query 11 output
+-20
+
+
+-- !query 12
+select + + 100
+-- !query 12 schema
+struct<100:int>
+-- !query 12 output
+100
+
+
+-- !query 13
+select - - max(key) from testdata
+-- !query 13 schema
+struct<(-(-max(key))):int>
+-- !query 13 output
+100
+
+
+-- !query 14
+select + - key from testdata where key = 33
+-- !query 14 schema
+struct<(-key):int>
+-- !query 14 output
+-33
+
+
+-- !query 15
+select 1 + 2
+-- !query 15 schema
+struct<(1 + 2):int>
+-- !query 15 output
+3
+
+
+-- !query 16
+select 1 - 2
+-- !query 16 schema
+struct<(1 - 2):int>
+-- !query 16 output
+-1
+
+
+-- !query 17
+select 2 * 5
+-- !query 17 schema
+struct<(2 * 5):int>
+-- !query 17 output
+10
+
+
+-- !query 18
+select 5 / 2
+-- !query 18 schema
+struct<(CAST(5 AS DOUBLE) / CAST(2 AS DOUBLE)):double>
+-- !query 18 output
+2.5
+
+
+-- !query 19
+select 5 div 2
+-- !query 19 schema
+struct<CAST((CAST(5 AS DOUBLE) / CAST(2 AS DOUBLE)) AS BIGINT):bigint>
+-- !query 19 output
+2
+
+
+-- !query 20
+select 5 % 3
+-- !query 20 schema
+struct<(5 % 3):int>
+-- !query 20 output
+2
+
+
+-- !query 21
+select pmod(-7, 3)
+-- !query 21 schema
+struct<pmod((-7), 3):int>
+-- !query 21 output
+2