You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by petermaxlee <gi...@git.apache.org> on 2016/08/11 07:58:03 UTC
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
GitHub user petermaxlee opened a pull request:
https://github.com/apache/spark/pull/14598
[SPARK-17018][SQL] literals.sql for testing literal parsing
## What changes were proposed in this pull request?
This patch adds literals.sql for testing literal parsing end-to-end in SQL.
## How was this patch tested?
The patch itself is only about adding test cases.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/petermaxlee/spark SPARK-17018-2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14598.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #14598
----
commit 15d2eecc1702b1556eadbabcf530c207fa64d8ee
Author: petermaxlee <pe...@gmail.com>
Date: 2016-08-11T07:54:56Z
[SPARK-17018][SQL] literals.sql for testing literal parsing
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74403147
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,136 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 1 Y, 127 Y, -127 Y
+-- !query 2 schema
+struct<1:tinyint,Y:int,Y:int,Y:int>
+-- !query 2 output
+1 1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 1 S, 32767 S, -32767 S
+-- !query 4 schema
+struct<1:smallint,S:int,S:int,S:int>
+-- !query 4 output
+1 1 32767 -32767
+
+
+-- !query 5
+select 32768 S
--- End diff --
Why? This will create Integer literal `32768` aliased as `S`. `select 32768S` does throw an exception.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74506995
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,148 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 127Y, -127Y
+-- !query 2 schema
+struct<1:tinyint,127:tinyint,(-127):tinyint>
+-- !query 2 output
+1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 32767S, -32767S
+-- !query 4 schema
+struct<1:smallint,32767:smallint,(-32767):smallint>
+-- !query 4 output
+1 32767 -32767
+
+
+-- !query 5
+select 32768S
+-- !query 5 schema
+struct<>
+-- !query 5 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"32768" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 32768S
+-------^^^
+
+
+-- !query 6
+select 1L, 2147483648L, 9223372036854775807L
+-- !query 6 schema
+struct<1:bigint,2147483648:bigint,9223372036854775807:bigint>
+-- !query 6 output
+1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808L
+-- !query 7 schema
+struct<>
+-- !query 7 output
+org.apache.spark.sql.catalyst.parser.ParseException
--- End diff --
Nevermind this one. We have someone working on it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on the issue:
https://github.com/apache/spark/pull/14598
I have updated this to include more string literals and added timestmap/date/interval parsing. That said, I didn't add all the test cases for interval because there were a large number, and I felt those are best left for parser unit tests.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on the issue:
https://github.com/apache/spark/pull/14598
I also didn't include \b and \0 parsing. Otherwise github shows the result file as binary and refuse to display the diff, which makes it more difficult to review.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74497449
--- Diff: sql/core/src/test/resources/sql-tests/inputs/literals.sql ---
@@ -0,0 +1,92 @@
+-- Literal parsing
+
+-- null
+select null, Null, nUll;
+
+-- boolean
+select true, tRue, false, fALse;
+
+-- byte (tinyint)
+select 1Y;
+select 127Y, -128Y;
+
+-- out of range byte
+select 128Y;
+
+-- short (smallint)
+select 1S;
+select 32767S, -32768S;
+
+-- out of range short
+select 32768S;
+
+-- long (bigint)
+select 1L, 2147483648L;
+select 9223372036854775807L, -9223372036854775808L;
+
+-- out of range long
+select 9223372036854775808L;
+
+-- integral parsing
+
+-- parse int
+select 1, -1;
+
+-- parse int max and min value as int
+select 2147483647, -2147483648;
+
+-- parse long max and min value as long
+select 9223372036854775807, -9223372036854775808;
+
+-- parse as decimals (Long.MaxValue + 1, and Long.MinValue - 1)
+select 9223372036854775808, -9223372036854775809;
+
+-- out of range decimal numbers
+select 1234567890123456789012345678901234567890;
+select 1234567890123456789012345678901234567890.0;
+
+-- double
+select 1D, 1.2D, 1e10, 1.5e5, .10D, 0.10D, .1e5, .9e+2, 0.9e+2, 900e-1, 9.e+1;
+select -1D, -1.2D, -1e10, -1.5e5, -.10D, -0.10D, -.1e5;
+-- negative double
+select .e3;
+-- inf and -inf
+select 1E309, -1E309;
+
+-- decimal parsing
+select 0.3, -0.8, .5, -.18, 0.1111, .1111;
+
+-- super large scientific notation numbers should still be valid doubles
+select 123456789012345678901234567890123456789e10, 123456789012345678901234567890123456789.1e10;
+
+-- string
+select "Hello Peter!", 'hello lee!';
+-- multi string
+select 'hello' 'world', 'hello' " " 'lee';
+-- single quote within double quotes
+select "hello 'peter'";
+select 'pattern%', 'no-pattern\%', 'pattern\\%', 'pattern\\\%';
+select '\'', '"', '\n', '\r', '\t', 'Z';
+-- "Hello!" in octals
+select '\110\145\154\154\157\041';
+-- "World :)" in unicode
+select '\u0057\u006F\u0072\u006C\u0064\u0020\u003A\u0029';
+
+-- date
+select dAte '2016-03-12';
+-- invalid date
+select date 'mar 11 2016';
+
+-- timestamp
+select tImEstAmp '2016-03-11 20:54:00.000';
+-- invalid timestamp
+select timestamp '2016-33-11 20:54:00.000';
+
+-- internal
--- End diff --
NIT: interval? :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74382888
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,148 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 127Y, -127Y
+-- !query 2 schema
+struct<1:tinyint,127:tinyint,(-127):tinyint>
+-- !query 2 output
+1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 32767S, -32767S
+-- !query 4 schema
+struct<1:smallint,32767:smallint,(-32767):smallint>
+-- !query 4 output
+1 32767 -32767
+
+
+-- !query 5
+select 32768S
+-- !query 5 schema
+struct<>
+-- !query 5 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"32768" Radix:10(line 1, pos 7)
--- End diff --
This exception message is a little bit weird with "radix".
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74380924
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,136 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 1 Y, 127 Y, -127 Y
+-- !query 2 schema
+struct<1:tinyint,Y:int,Y:int,Y:int>
+-- !query 2 output
+1 1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 1 S, 32767 S, -32767 S
+-- !query 4 schema
+struct<1:smallint,S:int,S:int,S:int>
+-- !query 4 output
+1 1 32767 -32767
+
+
+-- !query 5
+select 32768 S
--- End diff --
Shouldn't this throw an exception?
cc @cloud-fan / @rxin / @hvanhovell
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63598/
Test FAILed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74402656
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,136 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 1 Y, 127 Y, -127 Y
+-- !query 2 schema
+struct<1:tinyint,Y:int,Y:int,Y:int>
+-- !query 2 output
+1 1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 1 S, 32767 S, -32767 S
+-- !query 4 schema
+struct<1:smallint,S:int,S:int,S:int>
+-- !query 4 output
+1 1 32767 -32767
+
+
+-- !query 5
+select 32768 S
+-- !query 5 schema
+struct<S:int>
+-- !query 5 output
+32768
+
+
+-- !query 6
+select 1L, 1 L, 2147483648 L, 9223372036854775807 L
+-- !query 6 schema
+struct<1:bigint,L:int,L:bigint,L:bigint>
+-- !query 6 output
+1 1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808 L
+-- !query 7 schema
+struct<L:decimal(19,0)>
+-- !query 7 output
+9223372036854775808
+
+
+-- !query 8
+select 1, -1
+-- !query 8 schema
+struct<1:int,(-1):int>
+-- !query 8 output
+1 -1
+
+
+-- !query 9
+select 2147483647, -2147483648
+-- !query 9 schema
+struct<2147483647:int,(-2147483648):bigint>
+-- !query 9 output
+2147483647 -2147483648
+
+
+-- !query 10
+select 2147483648, -2147483649
+-- !query 10 schema
+struct<2147483648:bigint,(-2147483649):bigint>
+-- !query 10 output
+2147483648 -2147483649
+
+
+-- !query 11
+select 9223372036854775807, -9223372036854775808
+-- !query 11 schema
+struct<9223372036854775807:bigint,(-9223372036854775808):decimal(19,0)>
+-- !query 11 output
+9223372036854775807 -9223372036854775808
+
+
+-- !query 12
+select 9223372036854775808, -9223372036854775809
+-- !query 12 schema
+struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
+-- !query 12 output
+9223372036854775808 -9223372036854775809
+
+
+-- !query 13
+select 1D, 1 D, 1.2D, 1e10, 1.5e5, .10 D, 0.10 D, .1e5
--- End diff --
`BD` is a bigdecimal and `D` is a double.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74380954
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,136 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 1 Y, 127 Y, -127 Y
+-- !query 2 schema
+struct<1:tinyint,Y:int,Y:int,Y:int>
+-- !query 2 output
+1 1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 1 S, 32767 S, -32767 S
+-- !query 4 schema
+struct<1:smallint,S:int,S:int,S:int>
+-- !query 4 output
+1 1 32767 -32767
+
+
+-- !query 5
+select 32768 S
+-- !query 5 schema
+struct<S:int>
+-- !query 5 output
+32768
+
+
+-- !query 6
+select 1L, 1 L, 2147483648 L, 9223372036854775807 L
+-- !query 6 schema
+struct<1:bigint,L:int,L:bigint,L:bigint>
+-- !query 6 output
+1 1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808 L
--- End diff --
Shouldn't this throw an exception since 9223372036854775808 is larger than the valid range?
cc @cloud-fan / @rxin / @hvanhovell
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the issue:
https://github.com/apache/spark/pull/14598
This is pretty cool :)
I am comparing this to the `ExpressionParserSuite`. Shouldn't we add support for more complex string cases, intervals and a type constructors, see: https://github.com/apache/spark/blob/master/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala#L331-L498. If we do we can move these tests out of the `ExpressionParserSuite`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74427705
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,148 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 127Y, -127Y
+-- !query 2 schema
+struct<1:tinyint,127:tinyint,(-127):tinyint>
+-- !query 2 output
+1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 32767S, -32767S
+-- !query 4 schema
+struct<1:smallint,32767:smallint,(-32767):smallint>
+-- !query 4 output
+1 32767 -32767
+
+
+-- !query 5
+select 32768S
+-- !query 5 schema
+struct<>
+-- !query 5 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"32768" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 32768S
+-------^^^
+
+
+-- !query 6
+select 1L, 2147483648L, 9223372036854775807L
+-- !query 6 schema
+struct<1:bigint,2147483648:bigint,9223372036854775807:bigint>
+-- !query 6 output
+1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808L
+-- !query 7 schema
+struct<>
+-- !query 7 output
+org.apache.spark.sql.catalyst.parser.ParseException
--- End diff --
Hmmmm - this is funny. The exception/message is produced by `java.lang.Long.parseLong(...)`, but that doesn't seem to produce something sensible. I was expecting the something similar to the error `java.lang.Short.parseShort(...)` produces.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63593/
Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63597 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63597/consoleFull)** for PR 14598 at commit [`243cd39`](https://github.com/apache/spark/commit/243cd390259e07c06fa58a6f0a6c7994217e64da).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63626 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63626/consoleFull)** for PR 14598 at commit [`5565144`](https://github.com/apache/spark/commit/55651444f799d3418bcb5c4fc93ada4af7d3b9f7).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74470388
--- Diff: sql/core/src/test/resources/sql-tests/inputs/literals.sql ---
@@ -0,0 +1,52 @@
+-- Literal parsing
+
+-- null
+select null;
+
+-- boolean
+select true, false;
+
+-- byte (tinyint)
+select 1Y, 127Y, -127Y;
+select 128Y;
+
+-- short (smallint)
+select 1S, 32767S, -32767S;
+select 32768S;
+
+-- long (bigint)
+select 1L, 2147483648L, 9223372036854775807L;
+select 9223372036854775808L;
+
+-- integral parsing
+
+-- parse int
+select 1, -1;
+
+-- parse int max and min value
+select 2147483647, -2147483648;
+
+-- parse as longs (Int.MaxValue + 1, and Int.MinValue - 1)
+select 2147483648, -2147483649;
+
+-- parse long max and min value
+select 9223372036854775807, -9223372036854775808;
+
+-- parse as decimals (Long.MaxValue + 1, and Long.MinValue - 1)
+select 9223372036854775808, -9223372036854775809;
+
+-- double
+select 1D, 1.2D, 1e10, 1.5e5, .10D, 0.10D, .1e5;
+
+-- decimal parsing
+select 0.3, -0.8, .5, -.18, 0.1111, .1111;
+
+-- super large decimal numbers
+select 1234567890123456789012345678901234567890;
+select 1234567890123456789012345678901234567890.0;
+
+-- super large scientific notation numbers should still be valid doubles
+select 123456789012345678901234567890123456789e10, 123456789012345678901234567890123456789.1e10;
--- End diff --
Let me add that.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74381024
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,136 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 1 Y, 127 Y, -127 Y
+-- !query 2 schema
+struct<1:tinyint,Y:int,Y:int,Y:int>
+-- !query 2 output
+1 1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 1 S, 32767 S, -32767 S
+-- !query 4 schema
+struct<1:smallint,S:int,S:int,S:int>
+-- !query 4 output
+1 1 32767 -32767
+
+
+-- !query 5
+select 32768 S
+-- !query 5 schema
+struct<S:int>
+-- !query 5 output
+32768
+
+
+-- !query 6
+select 1L, 1 L, 2147483648 L, 9223372036854775807 L
+-- !query 6 schema
+struct<1:bigint,L:int,L:bigint,L:bigint>
+-- !query 6 output
+1 1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808 L
+-- !query 7 schema
+struct<L:decimal(19,0)>
+-- !query 7 output
+9223372036854775808
+
+
+-- !query 8
+select 1, -1
+-- !query 8 schema
+struct<1:int,(-1):int>
+-- !query 8 output
+1 -1
+
+
+-- !query 9
+select 2147483647, -2147483648
+-- !query 9 schema
+struct<2147483647:int,(-2147483648):bigint>
+-- !query 9 output
+2147483647 -2147483648
+
+
+-- !query 10
+select 2147483648, -2147483649
+-- !query 10 schema
+struct<2147483648:bigint,(-2147483649):bigint>
+-- !query 10 output
+2147483648 -2147483649
+
+
+-- !query 11
+select 9223372036854775807, -9223372036854775808
--- End diff --
this is a bug reported in SPARK-17013
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74470204
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,148 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 127Y, -127Y
+-- !query 2 schema
+struct<1:tinyint,127:tinyint,(-127):tinyint>
+-- !query 2 output
+1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 32767S, -32767S
+-- !query 4 schema
+struct<1:smallint,32767:smallint,(-32767):smallint>
+-- !query 4 output
+1 32767 -32767
+
+
+-- !query 5
+select 32768S
+-- !query 5 schema
+struct<>
+-- !query 5 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"32768" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 32768S
+-------^^^
+
+
+-- !query 6
+select 1L, 2147483648L, 9223372036854775807L
+-- !query 6 schema
+struct<1:bigint,2147483648:bigint,9223372036854775807:bigint>
+-- !query 6 output
+1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808L
+-- !query 7 schema
+struct<>
+-- !query 7 output
+org.apache.spark.sql.catalyst.parser.ParseException
--- End diff --
Should we parse integral literals as BigInteger, and then turn them into appropriate types? That way we have more control.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Merged build finished. Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63597/
Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74426121
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,148 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 127Y, -127Y
+-- !query 2 schema
+struct<1:tinyint,127:tinyint,(-127):tinyint>
+-- !query 2 output
+1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 32767S, -32767S
+-- !query 4 schema
+struct<1:smallint,32767:smallint,(-32767):smallint>
+-- !query 4 output
+1 32767 -32767
+
+
+-- !query 5
+select 32768S
+-- !query 5 schema
+struct<>
+-- !query 5 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"32768" Radix:10(line 1, pos 7)
--- End diff --
It is the error you get when calling `java.lang.Short.valueOf`. I do agree that the radix info is not that useful when you already assume this `10`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63625/
Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/14598
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the issue:
https://github.com/apache/spark/pull/14598
I'm going to merge this in master/2.0.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63598 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63598/consoleFull)** for PR 14598 at commit [`d60b2bb`](https://github.com/apache/spark/commit/d60b2bbef1fc00c8dfe0872a6ba22799b0067b06).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds no public classes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74472437
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,148 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 127Y, -127Y
+-- !query 2 schema
+struct<1:tinyint,127:tinyint,(-127):tinyint>
+-- !query 2 output
+1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 32767S, -32767S
+-- !query 4 schema
+struct<1:smallint,32767:smallint,(-32767):smallint>
+-- !query 4 output
+1 32767 -32767
+
+
+-- !query 5
+select 32768S
+-- !query 5 schema
+struct<>
+-- !query 5 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"32768" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 32768S
+-------^^^
+
+
+-- !query 6
+select 1L, 2147483648L, 9223372036854775807L
+-- !query 6 schema
+struct<1:bigint,2147483648:bigint,9223372036854775807:bigint>
+-- !query 6 output
+1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808L
+-- !query 7 schema
+struct<>
+-- !query 7 output
+org.apache.spark.sql.catalyst.parser.ParseException
--- End diff --
Sure. Will do.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63596 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63596/consoleFull)** for PR 14598 at commit [`c40c957`](https://github.com/apache/spark/commit/c40c9576683b1da01814ccba6a2347ea22011f50).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74403321
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,136 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 1 Y, 127 Y, -127 Y
+-- !query 2 schema
+struct<1:tinyint,Y:int,Y:int,Y:int>
+-- !query 2 output
+1 1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 1 S, 32767 S, -32767 S
+-- !query 4 schema
+struct<1:smallint,S:int,S:int,S:int>
+-- !query 4 output
+1 1 32767 -32767
+
+
+-- !query 5
+select 32768 S
+-- !query 5 schema
+struct<S:int>
+-- !query 5 output
+32768
+
+
+-- !query 6
+select 1L, 1 L, 2147483648 L, 9223372036854775807 L
+-- !query 6 schema
+struct<1:bigint,L:int,L:bigint,L:bigint>
+-- !query 6 output
+1 1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808 L
--- End diff --
See my previous comment on shorts. The same thing. This will produce a BigDecimal with an Alias.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74424129
--- Diff: sql/core/src/test/resources/sql-tests/inputs/literals.sql ---
@@ -0,0 +1,52 @@
+-- Literal parsing
+
+-- null
+select null;
+
+-- boolean
+select true, false;
+
+-- byte (tinyint)
+select 1Y, 127Y, -127Y;
+select 128Y;
+
+-- short (smallint)
+select 1S, 32767S, -32767S;
+select 32768S;
+
+-- long (bigint)
+select 1L, 2147483648L, 9223372036854775807L;
+select 9223372036854775808L;
+
+-- integral parsing
+
+-- parse int
+select 1, -1;
+
+-- parse int max and min value
+select 2147483647, -2147483648;
+
+-- parse as longs (Int.MaxValue + 1, and Int.MinValue - 1)
+select 2147483648, -2147483649;
+
+-- parse long max and min value
+select 9223372036854775807, -9223372036854775808;
+
+-- parse as decimals (Long.MaxValue + 1, and Long.MinValue - 1)
+select 9223372036854775808, -9223372036854775809;
+
+-- double
+select 1D, 1.2D, 1e10, 1.5e5, .10D, 0.10D, .1e5;
+
+-- decimal parsing
+select 0.3, -0.8, .5, -.18, 0.1111, .1111;
+
+-- super large decimal numbers
+select 1234567890123456789012345678901234567890;
+select 1234567890123456789012345678901234567890.0;
+
+-- super large scientific notation numbers should still be valid doubles
+select 123456789012345678901234567890123456789e10, 123456789012345678901234567890123456789.1e10;
--- End diff --
Shouldn't we also add really large double, `1E309` for instance (that will actually evaluate to positive infinity).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63626 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63626/consoleFull)** for PR 14598 at commit [`5565144`](https://github.com/apache/spark/commit/55651444f799d3418bcb5c4fc93ada4af7d3b9f7).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63597 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63597/consoleFull)** for PR 14598 at commit [`243cd39`](https://github.com/apache/spark/commit/243cd390259e07c06fa58a6f0a6c7994217e64da).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Merged build finished. Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74382625
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,136 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 1 Y, 127 Y, -127 Y
+-- !query 2 schema
+struct<1:tinyint,Y:int,Y:int,Y:int>
+-- !query 2 output
+1 1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 1 S, 32767 S, -32767 S
+-- !query 4 schema
+struct<1:smallint,S:int,S:int,S:int>
+-- !query 4 output
+1 1 32767 -32767
+
+
+-- !query 5
+select 32768 S
+-- !query 5 schema
+struct<S:int>
+-- !query 5 output
+32768
+
+
+-- !query 6
+select 1L, 1 L, 2147483648 L, 9223372036854775807 L
+-- !query 6 schema
+struct<1:bigint,L:int,L:bigint,L:bigint>
+-- !query 6 output
+1 1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808 L
--- End diff --
Actually my fault - let me update it since no space is allowed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Merged build finished. Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63626/
Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74471221
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,148 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 127Y, -127Y
+-- !query 2 schema
+struct<1:tinyint,127:tinyint,(-127):tinyint>
+-- !query 2 output
+1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 32767S, -32767S
+-- !query 4 schema
+struct<1:smallint,32767:smallint,(-32767):smallint>
+-- !query 4 output
+1 32767 -32767
+
+
+-- !query 5
+select 32768S
+-- !query 5 schema
+struct<>
+-- !query 5 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"32768" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 32768S
+-------^^^
+
+
+-- !query 6
+select 1L, 2147483648L, 9223372036854775807L
+-- !query 6 schema
+struct<1:bigint,2147483648:bigint,9223372036854775807:bigint>
+-- !query 6 output
+1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808L
+-- !query 7 schema
+struct<>
+-- !query 7 output
+org.apache.spark.sql.catalyst.parser.ParseException
--- End diff --
We do that already for 'untyped' (without a suffix) integral literals. I like your suggestion (this means we can also control the exception for Short better), could you open an PR for this?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Merged build finished. Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63625 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63625/consoleFull)** for PR 14598 at commit [`00bc63a`](https://github.com/apache/spark/commit/00bc63aa0686ecd2e3bb4df63c9bf7c1c0124efd).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Merged build finished. Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63596 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63596/consoleFull)** for PR 14598 at commit [`c40c957`](https://github.com/apache/spark/commit/c40c9576683b1da01814ccba6a2347ea22011f50).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63593 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63593/consoleFull)** for PR 14598 at commit [`15d2eec`](https://github.com/apache/spark/commit/15d2eecc1702b1556eadbabcf530c207fa64d8ee).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63593 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63593/consoleFull)** for PR 14598 at commit [`15d2eec`](https://github.com/apache/spark/commit/15d2eecc1702b1556eadbabcf530c207fa64d8ee).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74382861
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,148 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 127Y, -127Y
+-- !query 2 schema
+struct<1:tinyint,127:tinyint,(-127):tinyint>
+-- !query 2 output
+1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 32767S, -32767S
+-- !query 4 schema
+struct<1:smallint,32767:smallint,(-32767):smallint>
+-- !query 4 output
+1 32767 -32767
+
+
+-- !query 5
+select 32768S
+-- !query 5 schema
+struct<>
+-- !query 5 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"32768" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 32768S
+-------^^^
+
+
+-- !query 6
+select 1L, 2147483648L, 9223372036854775807L
+-- !query 6 schema
+struct<1:bigint,2147483648:bigint,9223372036854775807:bigint>
+-- !query 6 output
+1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808L
+-- !query 7 schema
+struct<>
+-- !query 7 output
+org.apache.spark.sql.catalyst.parser.ParseException
--- End diff --
This exception message can be better. It doesn't actually say out of range.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Merged build finished. Test FAILed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #14598: [SPARK-17018][SQL] literals.sql for testing liter...
Posted by petermaxlee <gi...@git.apache.org>.
Github user petermaxlee commented on a diff in the pull request:
https://github.com/apache/spark/pull/14598#discussion_r74382012
--- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
@@ -0,0 +1,136 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 16
+
+
+-- !query 0
+select null
+-- !query 0 schema
+struct<NULL:null>
+-- !query 0 output
+NULL
+
+
+-- !query 1
+select true, false
+-- !query 1 schema
+struct<true:boolean,false:boolean>
+-- !query 1 output
+true false
+
+
+-- !query 2
+select 1Y, 1 Y, 127 Y, -127 Y
+-- !query 2 schema
+struct<1:tinyint,Y:int,Y:int,Y:int>
+-- !query 2 output
+1 1 127 -127
+
+
+-- !query 3
+select 128Y
+-- !query 3 schema
+struct<>
+-- !query 3 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+Value out of range. Value:"128" Radix:10(line 1, pos 7)
+
+== SQL ==
+select 128Y
+-------^^^
+
+
+-- !query 4
+select 1S, 1 S, 32767 S, -32767 S
+-- !query 4 schema
+struct<1:smallint,S:int,S:int,S:int>
+-- !query 4 output
+1 1 32767 -32767
+
+
+-- !query 5
+select 32768 S
+-- !query 5 schema
+struct<S:int>
+-- !query 5 output
+32768
+
+
+-- !query 6
+select 1L, 1 L, 2147483648 L, 9223372036854775807 L
+-- !query 6 schema
+struct<1:bigint,L:int,L:bigint,L:bigint>
+-- !query 6 output
+1 1 2147483648 9223372036854775807
+
+
+-- !query 7
+select 9223372036854775808 L
+-- !query 7 schema
+struct<L:decimal(19,0)>
+-- !query 7 output
+9223372036854775808
+
+
+-- !query 8
+select 1, -1
+-- !query 8 schema
+struct<1:int,(-1):int>
+-- !query 8 output
+1 -1
+
+
+-- !query 9
+select 2147483647, -2147483648
+-- !query 9 schema
+struct<2147483647:int,(-2147483648):bigint>
+-- !query 9 output
+2147483647 -2147483648
+
+
+-- !query 10
+select 2147483648, -2147483649
+-- !query 10 schema
+struct<2147483648:bigint,(-2147483649):bigint>
+-- !query 10 output
+2147483648 -2147483649
+
+
+-- !query 11
+select 9223372036854775807, -9223372036854775808
+-- !query 11 schema
+struct<9223372036854775807:bigint,(-9223372036854775808):decimal(19,0)>
+-- !query 11 output
+9223372036854775807 -9223372036854775808
+
+
+-- !query 12
+select 9223372036854775808, -9223372036854775809
+-- !query 12 schema
+struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
+-- !query 12 output
+9223372036854775808 -9223372036854775809
+
+
+-- !query 13
+select 1D, 1 D, 1.2D, 1e10, 1.5e5, .10 D, 0.10 D, .1e5
--- End diff --
there is a bug here too.
I would expect .10 D to be parsed as double, not decimal.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63625 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63625/consoleFull)** for PR 14598 at commit [`00bc63a`](https://github.com/apache/spark/commit/00bc63aa0686ecd2e3bb4df63c9bf7c1c0124efd).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/14598
**[Test build #63598 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63598/consoleFull)** for PR 14598 at commit [`d60b2bb`](https://github.com/apache/spark/commit/d60b2bbef1fc00c8dfe0872a6ba22799b0067b06).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #14598: [SPARK-17018][SQL] literals.sql for testing literal pars...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/14598
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63596/
Test PASSed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org