[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/14592


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread rxin
Github user rxin commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74370013
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
--- End diff --

sgtm


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread petermaxlee
Github user petermaxlee commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74369492
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
--- End diff --

Can I add it in a separate pull request? I want to add all literal parsing 
here, but don't want to distract this pull request.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread rxin
Github user rxin commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74369336
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
--- End diff --

can you also add the boundary conditions for int as well? 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread petermaxlee
Github user petermaxlee commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74369163
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
 -- !query 2 schema

-struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
+struct<9223372036854775807:bigint,(-9223372036854775808):decimal(19,0)>
--- End diff --

Here it is https://issues.apache.org/jira/browse/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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread rxin
Github user rxin commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74369002
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
 -- !query 2 schema

-struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
+struct<9223372036854775807:bigint,(-9223372036854775808):decimal(19,0)>
--- End diff --

@petermaxlee can you file a jira ticket for this bug?



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread rxin
Github user rxin commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74368974
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
 -- !query 2 schema

-struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
+struct<9223372036854775807:bigint,(-9223372036854775808):decimal(19,0)>
--- End diff --

I'd call this a bug. I tried in Spark 1.6 and it was returning double 
(which was worse).

Here's postgres:
```
rxin=# select pg_typeof(-9223372036854775808);
 pg_typeof 
---
 bigint
(1 row)

rxin=# select pg_typeof(-9223372036854775807);
 pg_typeof 
---
 bigint
(1 row)

rxin=# select pg_typeof(-9223372036854775806);
 pg_typeof 
---
 bigint
(1 row)
```




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread cloud-fan
Github user cloud-fan commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74368708
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
 -- !query 2 schema

-struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
+struct<9223372036854775807:bigint,(-9223372036854775808):decimal(19,0)>
--- End diff --

maybe a parser bug? cc @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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread petermaxlee
Github user petermaxlee commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74367468
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
 -- !query 2 schema

-struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
+struct<9223372036854775807:bigint,(-9223372036854775808):decimal(19,0)>
--- End diff --

Also cc @sarutak who wrote the original test case.



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread petermaxlee
Github user petermaxlee commented on a diff in the pull request:

https://github.com/apache/spark/pull/14592#discussion_r74367410
  
--- Diff: 
sql/core/src/test/resources/sql-tests/results/number-format.sql.out ---
@@ -19,16 +19,24 @@ struct<2147483648:bigint,(-2147483649):bigint>
 
 
 -- !query 2
-select 9223372036854775808, -9223372036854775809
+select 9223372036854775807, -9223372036854775808
 -- !query 2 schema

-struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
+struct<9223372036854775807:bigint,(-9223372036854775808):decimal(19,0)>
--- End diff --

"-9223372036854775808" is a valid long value (Long.MinValue) but Spark 
treats it as a decimal(19, 0) because "9223372036854775808" is out of range. Is 
this expected?

cc @cloud-fan 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #14592: [SPARK-17011][SQL] Support testing exceptions in ...

2016-08-10 Thread petermaxlee
GitHub user petermaxlee opened a pull request:

https://github.com/apache/spark/pull/14592

[SPARK-17011][SQL] Support testing exceptions in SQLQueryTestSuite

## What changes were proposed in this pull request?
This patch adds exception testing to SQLQueryTestSuite. When there is an 
exception in query execution, the query result contains the the exception class 
along with the exception message.

As part of this, I moved some additional test cases for limit from 
SQLQuerySuite over to SQLQueryTestSuite.

## How was this patch tested?
This is a test harness change.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/petermaxlee/spark SPARK-17011

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/14592.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 #14592


commit 1a7cdc029f1cba22f7b8c59eaa241575b287983f
Author: petermaxlee 
Date:   2016-08-11T04:19:56Z

[SPARK-17011][SQL] Support testing exceptions in SQLQueryTestSuite




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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