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-35283][SQL] Support query some DDL with CTES #32852

Closed
wants to merge 7 commits into from

Conversation

beliefer
Copy link
Contributor

@beliefer beliefer commented Jun 10, 2021

What changes were proposed in this pull request?

Some command used to display metadata, such as: SHOW TABLES, SHOW TABLE EXTENDED,SHOW TBLPROPERTIES and so no.
If the output rows much than screen height, the output very unfriendly to developers.
So we should have a way to filter the output like the behavior of
WITH s AS (SHOW NAMESPACES) SELECT * FROM s WHERE namespace = 'query_ddl_namespace';

#32513 replace commands with something like local relation that produces unsafe rows, so can be more plan nodes above commands.

Why are the changes needed?

This PR provides a better way to display DDL when output rows much than screen height.

Does this PR introduce any user-facing change?

'Yes'. A new syntax.

How was this patch tested?

New tests.

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

Test build #139606 has finished for PR 32852 at commit 716a50c.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

Test build #139610 has finished for PR 32852 at commit 716a50c.

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

@wangyum
Copy link
Member

wangyum commented Jun 10, 2021

This is MySQL syntax:

mysql> SHOW CHARACTER SET WHERE `Default collation` LIKE '%japanese%';
+---------+---------------------------+---------------------+--------+
| Charset | Description               | Default collation   | Maxlen |
+---------+---------------------------+---------------------+--------+
| ujis    | EUC-JP Japanese           | ujis_japanese_ci    |      3 |
| sjis    | Shift-JIS Japanese        | sjis_japanese_ci    |      2 |
| cp932   | SJIS for Windows Japanese | cp932_japanese_ci   |      2 |
| eucjpms | UJIS for Windows Japanese | eucjpms_japanese_ci |      3 |
+---------+---------------------------+---------------------+--------+

https://dev.mysql.com/doc/refman/8.0/en/extended-show.html

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@beliefer
Copy link
Contributor Author

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

Test build #139623 has finished for PR 32852 at commit dc47094.

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

Test build #139638 has finished for PR 32852 at commit ae77a6b.

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

Test build #139647 has finished for PR 32852 at commit 243af5e.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 10, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 11, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 11, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 11, 2021

Test build #139668 has finished for PR 32852 at commit 243af5e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@beliefer
Copy link
Contributor Author

ping @cloud-fan @viirya @wangyum @maropu

@wangyum
Copy link
Member

wangyum commented Jun 18, 2021

Looks OK to me. cc @cloud-fan

@SparkQA
Copy link

SparkQA commented Jun 18, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 18, 2021

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

@SparkQA
Copy link

SparkQA commented Jun 18, 2021

Test build #139965 has finished for PR 32852 at commit f5dd033.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@github-actions
Copy link

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 27, 2021
@github-actions github-actions bot closed this Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants