-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-28390][SQL][PYTHON][TESTS] Convert and port 'pgSQL/select_having.sql' into UDF test base #25161
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
Conversation
|
Thanks for working on this. Let's wait for #25130. We need to fix UDF testing base itself |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After merging the PR I pointed out, let's try HAVING udf(1 > 2) combination as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
sql/core/src/test/resources/sql-tests/inputs/udf/pgSQL/udf-select_having.sql
Outdated
Show resolved
Hide resolved
|
Can you post the diff in the PR description as guided in the parent JIRA? |
Done |
|
PR description isn't exactly guided. It should be foldable with Detailshtml tag. |
|
|
ok to test |
|
#25130 is merged. Can you rebase and update it against the current master? |
sql/core/src/test/resources/sql-tests/inputs/udf/pgSQL/udf-select_having.sql
Outdated
Show resolved
Hide resolved
sql/core/src/test/resources/sql-tests/inputs/udf/pgSQL/udf-select_having.sql
Outdated
Show resolved
Hide resolved
sql/core/src/test/resources/sql-tests/inputs/udf/pgSQL/udf-select_having.sql
Outdated
Show resolved
Hide resolved
sql/core/src/test/resources/sql-tests/inputs/udf/pgSQL/udf-select_having.sql
Outdated
Show resolved
Hide resolved
|
Looks fine otherwise if the tests pass |
|
Test build #107821 has finished for PR 25161 at commit
|
changed the test according to steps mentnioned in SPARK-27921
|
Test build #107886 has finished for PR 25161 at commit
|
|
retest this please |
|
Test build #107889 has finished for PR 25161 at commit
|
sql/core/src/test/resources/sql-tests/inputs/udf/pgSQL/udf-select_having.sql
Outdated
Show resolved
Hide resolved
sql/core/src/test/resources/sql-tests/inputs/udf/pgSQL/udf-select_having.sql
Outdated
Show resolved
Hide resolved
|
Test build #107969 has finished for PR 25161 at commit
|
|
@shivusondur, is the diff correct? Looks weird: diff --git a/sql/core/src/test/resources/sql-tests/results/pgSQL/select_having.sql.out b/sql/core/src/test/resources/sql-tests/results/udf/pgSQL/udf-select_having.sql.out
index 02536eb..96ccd15 100644
--- a/sql/core/src/test/resources/sql-tests/results/pgSQL/select_having.sql.out
+++ b/sql/core/src/test/resources/sql-tests/results/udf/pgSQL/udf-select_having.sql.out
@@ -1,5 +1,5 @@
-- Automatically generated by SQLQueryTestSuite
--- Number of queries: 22
+-- Number of queries: 42 |
sql/core/src/test/resources/sql-tests/inputs/udf/pgSQL/udf-select_having.sql
Show resolved
Hide resolved
|
Test build #107979 has finished for PR 25161 at commit
|
|
Thanks for updating and addressing comments. Looks fine. Let me take a final look again before merging it. |
|
Test build #107997 has finished for PR 25161 at commit
|
| -- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add this todo on the top:
-- TODO: We should add UDFs in GROUP BY clause when [SPARK-28445] is resolved.
and remove same lines below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| -- Per SQL spec, these should generate 0 or 1 row, even without aggregates | ||
|
|
||
| SELECT udf(udf(min(udf(a)))), udf(udf(max(udf(a)))) FROM test_having HAVING udf(udf(min(udf(a)))) = udf(udf(max(udf(a)))); | ||
| SELECT udf(udf(min(udf(a)))), udf(udf(max(udf(a)))) FROM test_having HAVING udf(udf(min(udf(a)))) < udf(udf(max(udf(a)))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use different UDF combination comparing to the one right above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated like below
SELECT udf(udf(min(udf(a)))), udf(udf(max(udf(a)))) FROM test_having HAVING udf(udf(min(udf(a)))) = udf(udf(max(udf(a))));
SELECT udf(min(udf(a))), udf(udf(max(a))) FROM test_having HAVING udf(min(a)) < udf(max(udf(a)));
HyukjinKwon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good otherwise
|
Test build #108021 has finished for PR 25161 at commit
|
|
Test build #108031 has finished for PR 25161 at commit
|
|
retest this please |
1 similar comment
|
retest this please |
|
Test build #108068 has finished for PR 25161 at commit
|
|
Merged to master. |
What changes were proposed in this pull request?
changed the test according to steps mentioned in SPARK-27921
difference comparing to select_having.sql
How was this patch tested?
by:
sudo SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/test-only *SQLQueryTestSuite -- -z udf/pgSQL/udf-select_having.sql"