-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29873][SQL][TESTS] Support --import directive to load queries from another test case in SQLQueryTestSuite
#26497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| -- SPARK-23179: SQL ANSI 2011 states that in case of overflow during arithmetic operations, | ||
| -- an exception should be thrown instead of returning NULL. | ||
| -- This is what most of the SQL DBs do (eg. SQLServer, DB2). | ||
| --import decimalArithmeticOperations.sql | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| --import higher-order-functions.sql |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- malformed interval literal with ansi mode | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, do we still have interval related tests in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it ok to move all the interval-related queries here into
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think so. @yaooqinn do you have time to take it later? IIRC there are a few interval tests in
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok. As for
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. some cases are using the |
||
| --import literals.sql | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also still fails, too. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,25 +82,6 @@ select tImEstAmp '2016-03-11 20:54:00.000'; | |
| -- invalid timestamp | ||
| select timestamp '2016-33-11 20:54:00.000'; | ||
|
|
||
| -- interval | ||
| select interval 13.123456789 seconds, interval -13.123456789 second; | ||
| select interval 1 year 2 month 3 week 4 day 5 hour 6 minute 7 seconds 8 millisecond 9 microsecond; | ||
| select interval '30' year '25' month '-100' day '40' hour '80' minute '299.889987299' second; | ||
| select interval '0 0:0:0.1' day to second; | ||
| select interval '10-9' year to month; | ||
| select interval '20 15:40:32.99899999' day to hour; | ||
| select interval '20 15:40:32.99899999' day to minute; | ||
| select interval '20 15:40:32.99899999' day to second; | ||
| select interval '15:40:32.99899999' hour to minute; | ||
| select interval '15:40.99899999' hour to second; | ||
| select interval '15:40' hour to second; | ||
| select interval '15:40:32.99899999' hour to second; | ||
| select interval '20 40:32.99899999' minute to second; | ||
| select interval '40:32.99899999' minute to second; | ||
| select interval '40:32' minute to second; | ||
| -- ns is not supported | ||
| select interval 10 nanoseconds; | ||
|
|
||
| -- unsupported data type | ||
| select GEO '(10,-6)'; | ||
|
|
||
|
|
@@ -119,46 +100,14 @@ select X'XuZ'; | |
| -- Hive literal_double test. | ||
| SELECT 3.14, -3.14, 3.14e8, 3.14e-8, -3.14e8, -3.14e-8, 3.14e+8, 3.14E8, 3.14E-8; | ||
|
|
||
| -- map + interval test | ||
| select map(1, interval 1 day, 2, interval 3 week); | ||
|
|
||
| -- typed interval expression | ||
| select interval 'interval 3 year 1 hour'; | ||
| select interval '3 year 1 hour'; | ||
|
|
||
| -- typed integer expression | ||
| select integer '7'; | ||
| select integer'7'; | ||
| select integer '2147483648'; | ||
|
|
||
| -- malformed interval literal | ||
| select interval; | ||
| select interval 1 fake_unit; | ||
| select interval 1 year to month; | ||
| select interval '1' year to second; | ||
| select interval '10-9' year to month '2-1' year to month; | ||
| select interval '10-9' year to month '12:11:10' hour to second; | ||
| select interval '1 15:11' day to minute '12:11:10' hour to second; | ||
| select interval 1 year '2-1' year to month; | ||
| select interval 1 year '12:11:10' hour to second; | ||
| select interval '10-9' year to month '1' year; | ||
| select interval '12:11:10' hour to second '1' year; | ||
| -- malformed interval literal with ansi mode | ||
| SET spark.sql.ansi.enabled=true; | ||
| select interval; | ||
| select interval 1 fake_unit; | ||
| select interval 1 year to month; | ||
| select 1 year to month; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should move some tests to
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. I'll recheck later. Thanks! |
||
| select interval '1' year to second; | ||
| select '1' year to second; | ||
| select interval 1 year '2-1' year to month; | ||
| select 1 year '2-1' year to month; | ||
| SET spark.sql.ansi.enabled=false; | ||
|
|
||
| -- awareness of the negative sign before type | ||
| -- awareness of the negative/positive sign before type | ||
| select -integer '7'; | ||
| select -date '1999-01-01'; | ||
| select -timestamp '1999-01-01'; | ||
| select -x'2379ACFe'; | ||
| select +integer '7'; | ||
| select +interval '1 second'; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to fail still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, thanks for your catch-up! I've fixed now.