Skip to content

Commit

Permalink
[SPARK-29525][SQL][TEST] Fix the associated location already exists i…
Browse files Browse the repository at this point in the history
…n SQLQueryTestSuite

### What changes were proposed in this pull request?

This PR fix Fix the associated location already exists in `SQLQueryTestSuite`:
```
build/sbt "~sql/test-only *SQLQueryTestSuite -- -z postgreSQL/join.sql"
...
[info] - postgreSQL/join.sql *** FAILED *** (35 seconds, 420 milliseconds)
[info]   postgreSQL/join.sql
[info]   Expected "[]", but got "[org.apache.spark.sql.AnalysisException
[info]   Can not create the managed table('`default`.`tt3`'). The associated location('file:/root/spark/sql/core/spark-warehouse/org.apache.spark.sql.SQLQueryTestSuite/tt3') already exists.;]" Result did not match for query #108
```

### Why are the changes needed?
Fix bug.

### Does this PR introduce any user-facing change?
No

### How was this patch tested?
N/A

Closes #26181 from wangyum/TestError.

Authored-by: Yuming Wang <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
  • Loading branch information
wangyum authored and dongjoon-hyun committed Oct 20, 2019
1 parent 4a6005c commit 0f65b49
Show file tree
Hide file tree
Showing 2 changed files with 228 additions and 256 deletions.
12 changes: 6 additions & 6 deletions sql/core/src/test/resources/sql-tests/inputs/postgreSQL/join.sql
Original file line number Diff line number Diff line change
Expand Up @@ -577,15 +577,15 @@ select count(*) from tenk1 a, tenk1 b
-- regression test for 8.2 bug with improper re-ordering of left joins
--

DROP TABLE IF EXISTS tt3;
CREATE TABLE tt3(f1 int, f2 string) USING parquet;
INSERT INTO tt3 SELECT x.id, repeat('xyzzy', 100) FROM range(1,10001) x;
create or replace temporary view tt3 as select * from
(SELECT cast(x.id as int), repeat('xyzzy', 100) FROM range(1,10001) x)
as v(f1, f2);
-- create index tt3i on tt3(f1);
-- analyze tt3;

DROP TABLE IF EXISTS tt4;
CREATE TABLE tt4(f1 int) USING parquet;
INSERT INTO tt4 VALUES (0),(1),(9999);
create or replace temporary view tt4 as select * from
(values (0), (1), (9999))
as v(f1);
-- analyze tt4;

SELECT a.f1
Expand Down
Loading

0 comments on commit 0f65b49

Please sign in to comment.