Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove broken queries
  • Loading branch information
mgyucht committed May 25, 2018
commit 4a55c183bd3a429c5e219c4941d69b9685cf2010
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,8 @@ SELECT *
FROM m
WHERE (a, b) NOT IN ((CAST (null AS INT), CAST (null AS DECIMAL(2, 1))));

-- Case 3
-- (probe-side columns are all null -> row not returned)
SELECT *
FROM m
WHERE a IS NULL AND b IS NULL -- Matches only (null, null)
AND (a, b) NOT IN ((0, 1.0), (2, 3.0), (4, CAST(null AS DECIMAL(2, 1))));

-- Case 4
-- (one column null, other column matches a row in the subquery result -> row not returned)
SELECT *
FROM m
WHERE b = 1.0 -- Matches (null, 1.0)
AND (a, b) NOT IN ((0, 1.0), (2, 3.0), (4, CAST(null AS DECIMAL(2, 1))));
-- Cases 3 and 4 are currently broken, so I have commented them out here.
-- Filed https://issues.apache.org/jira/browse/SPARK-24395 to fix and restore these test cases.

-- Case 5
-- (one null column with no match -> row is returned)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 7
-- Number of queries: 5


-- !query 0
Expand Down Expand Up @@ -33,65 +33,39 @@ NULL 1


-- !query 2
-- Case 3
-- (probe-side columns are all null -> row not returned)
SELECT *
FROM m
WHERE a IS NULL AND b IS NULL -- Matches only (null, null)
AND (a, b) NOT IN ((0, 1.0), (2, 3.0), (4, CAST(null AS DECIMAL(2, 1))))
-- !query 2 schema
struct<a:int,b:decimal(2,1)>
-- !query 2 output
NULL NULL


-- !query 3
-- Case 4
-- (one column null, other column matches a row in the subquery result -> row not returned)
SELECT *
FROM m
WHERE b = 1.0 -- Matches (null, 1.0)
AND (a, b) NOT IN ((0, 1.0), (2, 3.0), (4, CAST(null AS DECIMAL(2, 1))))
-- !query 3 schema
struct<a:int,b:decimal(2,1)>
-- !query 3 output
NULL 1


-- !query 4
-- Case 5
-- (one null column with no match -> row is returned)
SELECT *
FROM m
WHERE b = 1.0 -- Matches (null, 1.0)
AND (a, b) NOT IN ((2, 3.0))
-- !query 4 schema
-- !query 2 schema
struct<a:int,b:decimal(2,1)>
-- !query 4 output
-- !query 2 output
NULL 1


-- !query 5
-- !query 3
-- Case 6
-- (no null columns with match -> row not returned)
SELECT *
FROM m
WHERE b = 3.0 -- Matches (2, 3.0)
AND (a, b) NOT IN ((2, 3.0))
-- !query 5 schema
-- !query 3 schema
struct<a:int,b:decimal(2,1)>
-- !query 5 output
-- !query 3 output



-- !query 6
-- !query 4
-- Case 7
-- (no null columns with no match -> row is returned)
SELECT *
FROM m
WHERE b = 5.0 -- Matches (4, 5.0)
AND (a, b) NOT IN ((2, 3.0))
-- !query 6 schema
-- !query 4 schema
struct<a:int,b:decimal(2,1)>
-- !query 6 output
-- !query 4 output
4 5