Skip to content

Conversation

@AngersZhuuuu
Copy link
Contributor

What changes were proposed in this pull request?

Support SHOW TABLES command as a table valued function.
So user can be easy to reach metadata system information use SQL and analysis directory.

Why are the changes needed?

user can be easy to reach metadata system information use SQL and analysis directory.

Does this PR introduce any user-facing change?

Yea, user can get table list by call table valued function show_table()

       sql("CREATE DATABASE d1")
        sql("CREATE TABLE t1(a INT) USING PARQUET")
        sql("CREATE TABLE d1.t1(a INT) USING PARQUET")
        sql("CREATE TABLE d1.t2(a INT) USING PARQUET")

        sql("SELECT * from show_tables()")
        sql("SELECT * from show_tables('default')")
        sql("SELECT * from show_tables('d1')")
        sql("SELECT * from show_tables('d1', 't1*')")

How was this patch tested?

Added UT

@AngersZhuuuu
Copy link
Contributor Author

AngersZhuuuu commented Jan 20, 2021

This PR should wait #31245 completed

@github-actions github-actions bot added the SQL label Jan 20, 2021
@SparkQA
Copy link

SparkQA commented Jan 20, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38844/

}
}

test("SPARK-33630: Support SHOW command as table valued function") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, place tests like this to the unified test suites for v1/v2 commands. See ShowTablesSuite.

@SparkQA
Copy link

SparkQA commented Jan 20, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38844/

@SparkQA
Copy link

SparkQA commented Jan 20, 2021

Test build #134258 has finished for PR 31257 at commit 1d1121c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AngersZhuuuu AngersZhuuuu changed the title [SPARK-33630][SQL] Support SHOW command as table valued function [SPARK-33630][SQL] Support SHOW TABLES command as table valued function Feb 5, 2021
@AngersZhuuuu
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Feb 28, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40133/

@SparkQA
Copy link

SparkQA commented Feb 28, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40133/

@SparkQA
Copy link

SparkQA commented Feb 28, 2021

Test build #135552 has finished for PR 31257 at commit 1d1121c.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member

maropu commented Feb 28, 2021

Is this related to #31548 ?

@AngersZhuuuu
Copy link
Contributor Author

AngersZhuuuu commented Feb 28, 2021

Is this related to #31548 ?

Yea, do same thing but different ways. I have raise this pr one month ago, hmmm since this is pending by https://issues.apache.org/jira/browse/SPARK-34157, so I left it until that pr merge.
Anyway it's a useful method. Seems we use different way to do this. I think it’s good if you use either method.

Seems his method is more general, looks good.

@SparkQA
Copy link

SparkQA commented Feb 28, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40135/

@SparkQA
Copy link

SparkQA commented Feb 28, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40135/

@SparkQA
Copy link

SparkQA commented Feb 28, 2021

Test build #135554 has finished for PR 31257 at commit 1c11abb.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Apr 2, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41424/

@SparkQA
Copy link

SparkQA commented Apr 2, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/41424/

@SparkQA
Copy link

SparkQA commented Apr 19, 2021

Test build #137562 has finished for PR 31257 at commit 1c11abb.

  • This patch fails Spark unit tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented May 25, 2021

Test build #138940 has finished for PR 31257 at commit 1c11abb.

  • This patch fails Spark unit tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@github-actions
Copy link

github-actions bot commented Sep 3, 2021

We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!

@github-actions github-actions bot added the Stale label Sep 3, 2021
@github-actions github-actions bot closed this Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants