Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Expand Up @@ -8,7 +8,7 @@
-- avoid bit-exact output here because operations may not be bit-exact.
-- SET extra_float_digits = 0;

-- This test file was converted from pgSQL/aggregates_part1.sql.
-- This test file was converted from postgreSQL/aggregates_part1.sql.

SELECT avg(udf(four)) AS avg_1 FROM onek;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- AGGREGATES [Part 2]
-- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/aggregates.sql#L145-L350
--
-- This test file was converted from pgSQL/aggregates_part2.sql.
-- This test file was converted from postgreSQL/aggregates_part2.sql.

create temporary view int4_tbl as select * from values
(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- AGGREGATES [Part 3]
-- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/aggregates.sql#L352-L605

-- This test file was converted from pgSQL/aggregates_part3.sql.
-- This test file was converted from postgreSQL/aggregates_part3.sql.

-- [SPARK-28865] Table inheritance
-- try it on an inheritance tree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- AGGREGATES [Part 4]
-- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/aggregates.sql#L607-L997

-- This test file was converted from pgSQL/aggregates_part4.sql.
-- This test file was converted from postgreSQL/aggregates_part4.sql.

-- [SPARK-27980] Ordered-Set Aggregate Functions
-- ordered-set aggregates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/case.sql
-- Test the CASE statement
--
-- This test file was converted from pgSQL/case.sql.
-- This test file was converted from postgreSQL/case.sql.

CREATE TABLE CASE_TBL (
i integer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-- Test JOIN clauses
-- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/join.sql
--
-- This test file was converted from pgSQL/join.sql.
-- This test file was converted from postgreSQL/join.sql.

CREATE OR REPLACE TEMPORARY VIEW INT4_TBL AS SELECT * FROM
(VALUES (0), (123456), (-123456), (2147483647), (-2147483647))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- SELECT_HAVING
-- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/select_having.sql
--
-- This test file was converted from inputs/pgSQL/select_having.sql
-- This test file was converted from inputs/postgreSQL/select_having.sql
-- TODO: We should add UDFs in GROUP BY clause when [SPARK-28386] and [SPARK-26741] is resolved.

-- load test data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
-- - thomas 1998-07-09
-- https://github.com/postgres/postgres/blob/REL_12_BETA2/src/test/regress/sql/select_implicit.sql
--
-- This test file was converted from pgSQL/select_implicit.sql
-- This test file was converted from postgreSQL/select_implicit.sql

-- load test data
CREATE TABLE test_missing_target (a int, b int, c string, d string) using parquet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
val testCaseName = absPath.stripPrefix(inputFilePath).stripPrefix(File.separator)

if (file.getAbsolutePath.startsWith(
s"$inputFilePath${File.separator}udf${File.separator}pgSQL")) {
s"$inputFilePath${File.separator}udf${File.separator}postgreSQL")) {
Seq(TestScalaUDF("udf"), TestPythonUDF("udf"), TestScalarPandasUDF("udf")).map { udf =>
UDFPgSQLTestCase(
s"$testCaseName - ${udf.prettyName}", absPath, resultFile, udf)
Expand All @@ -461,7 +461,7 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession {
UDFTestCase(
s"$testCaseName - ${udf.prettyName}", absPath, resultFile, udf)
}
} else if (file.getAbsolutePath.startsWith(s"$inputFilePath${File.separator}pgSQL")) {
} else if (file.getAbsolutePath.startsWith(s"$inputFilePath${File.separator}postgreSQL")) {
PgSQLTestCase(testCaseName, absPath, resultFile) :: Nil
} else {
RegularTestCase(testCaseName, absPath, resultFile) :: Nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ class ThriftServerQueryTestSuite extends SQLQueryTestSuite {
override def blackList: Set[String] = Set(
"blacklist.sql", // Do NOT remove this one. It is here to test the blacklist functionality.
// Missing UDF
"pgSQL/boolean.sql",
"pgSQL/case.sql",
"postgreSQL/boolean.sql",
"postgreSQL/case.sql",
// SPARK-28624
"date.sql",
// SPARK-28620
"pgSQL/float4.sql",
"postgreSQL/float4.sql",
// SPARK-28636
"decimalArithmeticOperations.sql",
"literals.sql",
Expand Down Expand Up @@ -238,7 +238,7 @@ class ThriftServerQueryTestSuite extends SQLQueryTestSuite {

if (file.getAbsolutePath.startsWith(s"$inputFilePath${File.separator}udf")) {
Seq.empty
} else if (file.getAbsolutePath.startsWith(s"$inputFilePath${File.separator}pgSQL")) {
} else if (file.getAbsolutePath.startsWith(s"$inputFilePath${File.separator}postgreSQL")) {
PgSQLTestCase(testCaseName, absPath, resultFile) :: Nil
} else {
RegularTestCase(testCaseName, absPath, resultFile) :: Nil
Expand Down Expand Up @@ -367,7 +367,7 @@ class ThriftServerQueryTestSuite extends SQLQueryTestSuite {
upperCase.startsWith("SELECT ") || upperCase.startsWith("SELECT\n") ||
upperCase.startsWith("WITH ") || upperCase.startsWith("WITH\n") ||
upperCase.startsWith("VALUES ") || upperCase.startsWith("VALUES\n") ||
// pgSQL/union.sql
// postgreSQL/union.sql
upperCase.startsWith("(")
}

Expand Down