Skip to content
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

[SPARK-48844][FOLLOWUP][TESTS] Cleanup duplicated data resource files in hive-thriftserver test #47480

Closed
wants to merge 4 commits into from
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
-- Automatically generated by SQLQueryTestSuite
-- !query
CREATE TABLE TEST_PARQUET USING PARQUET AS SELECT 1
-- !query analysis
CreateDataSourceTableAsSelectCommand `spark_catalog`.`default`.`TEST_PARQUET`, ErrorIfExists, [1]
+- Project [1 AS 1#x]
+- OneRowRelation


-- !query
SELECT * FROM parquet.``
-- !query analysis
Expand Down Expand Up @@ -33,12 +41,25 @@ org.apache.spark.sql.AnalysisException


-- !query
SELECT * FROM parquet.`src/test/resources/test-data/dec-in-fixed-len.parquet` LIMIT 1
SELECT * FROM parquet.`${spark.sql.warehouse.dir}/TEST_PARQUET`
-- !query analysis
Project [1#x]
+- Relation [1#x] parquet


-- !query
DROP TABLE TEST_PARQUET
-- !query analysis
GlobalLimit 1
+- LocalLimit 1
+- Project [fixed_len_dec#x]
+- Relation [fixed_len_dec#x] parquet
DropTable false, false
+- ResolvedIdentifier V2SessionCatalog(spark_catalog), default.TEST_PARQUET


-- !query
CREATE TABLE TEST_ORC USING ORC AS SELECT 1
-- !query analysis
CreateDataSourceTableAsSelectCommand `spark_catalog`.`default`.`TEST_ORC`, ErrorIfExists, [1]
+- Project [1 AS 1#x]
+- OneRowRelation


-- !query
Expand Down Expand Up @@ -75,12 +96,25 @@ org.apache.spark.sql.AnalysisException


-- !query
SELECT * FROM orc.`src/test/resources/test-data/before_1582_date_v2_4.snappy.orc` LIMIT 1
SELECT * FROM orc.`${spark.sql.warehouse.dir}/TEST_ORC`
-- !query analysis
Project [1#x]
+- Relation [1#x] orc


-- !query
DROP TABLE TEST_ORC
-- !query analysis
GlobalLimit 1
+- LocalLimit 1
+- Project [dt#x]
+- Relation [dt#x] orc
DropTable false, false
+- ResolvedIdentifier V2SessionCatalog(spark_catalog), default.TEST_ORC


-- !query
CREATE TABLE TEST_CSV USING CSV AS SELECT 1
-- !query analysis
CreateDataSourceTableAsSelectCommand `spark_catalog`.`default`.`TEST_CSV`, ErrorIfExists, [1]
+- Project [1 AS 1#x]
+- OneRowRelation


-- !query
Expand Down Expand Up @@ -117,12 +151,25 @@ org.apache.spark.sql.AnalysisException


-- !query
SELECT * FROM csv.`src/test/resources/test-data/cars.csv` LIMIT 1
SELECT * FROM csv.`${spark.sql.warehouse.dir}/TEST_CSV`
-- !query analysis
Project [_c0#x]
+- Relation [_c0#x] csv


-- !query
DROP TABLE TEST_CSV
-- !query analysis
GlobalLimit 1
+- LocalLimit 1
+- Project [_c0#x, _c1#x, _c2#x, _c3#x, _c4#x]
+- Relation [_c0#x,_c1#x,_c2#x,_c3#x,_c4#x] csv
DropTable false, false
+- ResolvedIdentifier V2SessionCatalog(spark_catalog), default.TEST_CSV


-- !query
CREATE TABLE TEST_JSON USING JSON AS SELECT 1
-- !query analysis
CreateDataSourceTableAsSelectCommand `spark_catalog`.`default`.`TEST_JSON`, ErrorIfExists, [1]
+- Project [1 AS 1#x]
+- OneRowRelation


-- !query
Expand Down Expand Up @@ -159,9 +206,14 @@ org.apache.spark.sql.AnalysisException


-- !query
SELECT * FROM json.`src/test/resources/test-data/with-map-fields.json` LIMIT 1
SELECT * FROM json.`${spark.sql.warehouse.dir}/TEST_JSON`
-- !query analysis
Project [1#xL]
+- Relation [1#xL] json


-- !query
DROP TABLE TEST_JSON
-- !query analysis
GlobalLimit 1
+- LocalLimit 1
+- Project [id#xL, intervals#x]
+- Relation [id#xL,intervals#x] json
DropTable false, false
+- ResolvedIdentifier V2SessionCatalog(spark_catalog), default.TEST_JSON
16 changes: 12 additions & 4 deletions sql/core/src/test/resources/sql-tests/inputs/sql-on-files.sql
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
-- Parquet
CREATE TABLE TEST_PARQUET USING PARQUET AS SELECT 1;
SELECT * FROM parquet.``;
SELECT * FROM parquet.`/file/not/found`;
SELECT * FROM parquet.`src/test/resources/test-data/dec-in-fixed-len.parquet` LIMIT 1;
SELECT * FROM parquet.`${spark.sql.warehouse.dir}/TEST_PARQUET`;
DROP TABLE TEST_PARQUET;

-- ORC
CREATE TABLE TEST_ORC USING ORC AS SELECT 1;
SELECT * FROM orc.``;
SELECT * FROM orc.`/file/not/found`;
SELECT * FROM orc.`src/test/resources/test-data/before_1582_date_v2_4.snappy.orc` LIMIT 1;
SELECT * FROM orc.`${spark.sql.warehouse.dir}/TEST_ORC`;
DROP TABLE TEST_ORC;

-- CSV
CREATE TABLE TEST_CSV USING CSV AS SELECT 1;
SELECT * FROM csv.``;
SELECT * FROM csv.`/file/not/found`;
SELECT * FROM csv.`src/test/resources/test-data/cars.csv` LIMIT 1;
SELECT * FROM csv.`${spark.sql.warehouse.dir}/TEST_CSV`;
DROP TABLE TEST_CSV;

-- JSON
CREATE TABLE TEST_JSON USING JSON AS SELECT 1;
SELECT * FROM json.``;
SELECT * FROM json.`/file/not/found`;
SELECT * FROM json.`src/test/resources/test-data/with-map-fields.json` LIMIT 1;
SELECT * FROM json.`${spark.sql.warehouse.dir}/TEST_JSON`;
DROP TABLE TEST_JSON;
88 changes: 76 additions & 12 deletions sql/core/src/test/resources/sql-tests/results/sql-on-files.sql.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
-- Automatically generated by SQLQueryTestSuite
-- !query
CREATE TABLE TEST_PARQUET USING PARQUET AS SELECT 1
-- !query schema
struct<>
-- !query output



-- !query
SELECT * FROM parquet.``
-- !query schema
Expand Down Expand Up @@ -37,11 +45,27 @@ org.apache.spark.sql.AnalysisException


-- !query
SELECT * FROM parquet.`src/test/resources/test-data/dec-in-fixed-len.parquet` LIMIT 1
SELECT * FROM parquet.`${spark.sql.warehouse.dir}/TEST_PARQUET`
-- !query schema
struct<1:int>
-- !query output
1


-- !query
DROP TABLE TEST_PARQUET
-- !query schema
struct<>
-- !query output



-- !query
CREATE TABLE TEST_ORC USING ORC AS SELECT 1
-- !query schema
struct<fixed_len_dec:decimal(10,2)>
struct<>
-- !query output
0.00



-- !query
Expand Down Expand Up @@ -82,11 +106,27 @@ org.apache.spark.sql.AnalysisException


-- !query
SELECT * FROM orc.`src/test/resources/test-data/before_1582_date_v2_4.snappy.orc` LIMIT 1
SELECT * FROM orc.`${spark.sql.warehouse.dir}/TEST_ORC`
-- !query schema
struct<1:int>
-- !query output
1


-- !query
DROP TABLE TEST_ORC
-- !query schema
struct<>
-- !query output



-- !query
CREATE TABLE TEST_CSV USING CSV AS SELECT 1
-- !query schema
struct<dt:date>
struct<>
-- !query output
1200-01-01



-- !query
Expand Down Expand Up @@ -127,11 +167,27 @@ org.apache.spark.sql.AnalysisException


-- !query
SELECT * FROM csv.`src/test/resources/test-data/cars.csv` LIMIT 1
SELECT * FROM csv.`${spark.sql.warehouse.dir}/TEST_CSV`
-- !query schema
struct<_c0:string>
-- !query output
1


-- !query
DROP TABLE TEST_CSV
-- !query schema
struct<>
-- !query output



-- !query
CREATE TABLE TEST_JSON USING JSON AS SELECT 1
-- !query schema
struct<_c0:string,_c1:string,_c2:string,_c3:string,_c4:string>
struct<>
-- !query output
year make model comment blank



-- !query
Expand Down Expand Up @@ -172,8 +228,16 @@ org.apache.spark.sql.AnalysisException


-- !query
SELECT * FROM json.`src/test/resources/test-data/with-map-fields.json` LIMIT 1
SELECT * FROM json.`${spark.sql.warehouse.dir}/TEST_JSON`
-- !query schema
struct<id:bigint,intervals:struct<a:struct<endTime:bigint,startTime:bigint>,b:struct<endTime:bigint,startTime:bigint>>>
struct<1:bigint>
-- !query output
1 {"a":{"endTime":211,"startTime":111},"b":{"endTime":221,"startTime":121}}
1


-- !query
DROP TABLE TEST_JSON
-- !query schema
struct<>
-- !query output

Binary file not shown.
7 changes: 0 additions & 7 deletions sql/hive-thriftserver/src/test/resources/test-data/cars.csv

This file was deleted.

Binary file not shown.

This file was deleted.