Add test case for Issue #88
authorPallavi Sontakke <[email protected]>
Tue, 19 Jul 2016 09:54:19 +0000 (15:24 +0530)
committerPallavi Sontakke <[email protected]>
Tue, 19 Jul 2016 09:54:19 +0000 (15:24 +0530)
src/test/regress/expected/xl_sqlsmith_bugs.out
src/test/regress/sql/xl_sqlsmith_bugs.sql

index 71c7c8c7da56888ea5c2d6677f764d9bab2bfb3a..6f9cb4163bb6a4ed416a0398a44682c7ceebf077 100644 (file)
@@ -1,3 +1,49 @@
+-- #88
+-- SQLsmith: Error: unsupported data type for HASH locator:
+CREATE TABLE xl_join_t1 (val1 int, val2 int);
+CREATE TABLE xl_join_t2 (val1 int, val2 int);
+CREATE TABLE xl_join_t3 (val1 int, val2 int);
+INSERT INTO xl_join_t1 VALUES (1,10),(2,20);
+INSERT INTO xl_join_t2 VALUES (3,30),(4,40);
+INSERT INTO xl_join_t3 VALUES (5,50),(6,60);EXPLAIN SELECT * FROM xl_join_t1
+        INNER JOIN xl_join_t2 ON xl_join_t1.val1 = xl_join_t2.val2
+        INNER JOIN xl_join_t3 ON xl_join_t1.val1 = xl_join_t3.val1;
+                                                      QUERY PLAN                                                      
+----------------------------------------------------------------------------------------------------------------------
+ Remote Subquery Scan on all (datanode_1,datanode_2)  (cost=475.52..5209.87 rows=288579 width=24)
+   ->  Merge Join  (cost=475.52..5209.87 rows=288579 width=24)
+         Merge Cond: (xl_join_t3.val1 = xl_join_t1.val1)
+         ->  Sort  (cost=158.51..164.16 rows=2260 width=8)
+               Sort Key: xl_join_t3.val1
+               ->  Seq Scan on xl_join_t3  (cost=0.00..32.60 rows=2260 width=8)
+         ->  Materialize  (cost=317.01..775.23 rows=25538 width=16)
+               ->  Merge Join  (cost=317.01..711.38 rows=25538 width=16)
+                     Merge Cond: (xl_join_t2.val2 = xl_join_t1.val1)
+                     ->  Remote Subquery Scan on all (datanode_1,datanode_2)  (cost=100.00..161.98 rows=2260 width=8)
+                           Distribute results by H: val2
+                           ->  Sort  (cost=287.89..293.54 rows=2260 width=8)
+                                 Sort Key: xl_join_t2.val2
+                                 ->  Seq Scan on xl_join_t2  (cost=0.00..32.60 rows=2260 width=8)
+                     ->  Sort  (cost=158.51..164.16 rows=2260 width=8)
+                           Sort Key: xl_join_t1.val1
+                           ->  Seq Scan on xl_join_t1  (cost=0.00..32.60 rows=2260 width=8)
+(17 rows)
+
+SELECT * FROM xl_join_t1
+        INNER JOIN xl_join_t2 ON xl_join_t1.val1 = xl_join_t2.val2
+        INNER JOIN xl_join_t3 ON xl_join_t1.val1 = xl_join_t3.val1;
+ val1 | val2 | val1 | val2 | val1 | val2 
+------+------+------+------+------+------
+(0 rows)
+
+insert into public.xl_join_t1 values (
+        (select character_maximum_length from information_schema.routines limit 1 offset 15)
+        ,
+        33);
+
+DROP TABLE xl_join_t1;
+DROP TABLE xl_join_t2;
+DROP TABLE xl_join_t3;
 -- #87
 -- SQLsmith error: cache lookup failed for function 0
 CREATE TABLE xl_join_t1 (val1 int, val2 int);
index 1000fe059e79458a334907589617f60c3a385ad3..206afa5d87c37deff3f8c635ab47b7ed0bb8aa3b 100644 (file)
@@ -1,3 +1,28 @@
+-- #88
+-- SQLsmith: Error: unsupported data type for HASH locator:
+
+CREATE TABLE xl_join_t1 (val1 int, val2 int);
+CREATE TABLE xl_join_t2 (val1 int, val2 int);
+CREATE TABLE xl_join_t3 (val1 int, val2 int);
+INSERT INTO xl_join_t1 VALUES (1,10),(2,20);
+INSERT INTO xl_join_t2 VALUES (3,30),(4,40);
+INSERT INTO xl_join_t3 VALUES (5,50),(6,60);EXPLAIN SELECT * FROM xl_join_t1
+        INNER JOIN xl_join_t2 ON xl_join_t1.val1 = xl_join_t2.val2
+        INNER JOIN xl_join_t3 ON xl_join_t1.val1 = xl_join_t3.val1;
+SELECT * FROM xl_join_t1
+        INNER JOIN xl_join_t2 ON xl_join_t1.val1 = xl_join_t2.val2
+        INNER JOIN xl_join_t3 ON xl_join_t1.val1 = xl_join_t3.val1;
+
+
+insert into public.xl_join_t1 values (
+        (select character_maximum_length from information_schema.routines limit 1 offset 15)
+        ,
+        33);
+
+DROP TABLE xl_join_t1;
+DROP TABLE xl_join_t2;
+DROP TABLE xl_join_t3;
+
 -- #87
 -- SQLsmith error: cache lookup failed for function 0