Skip to content

Conversation

@AngersZhuuuu
Copy link
Contributor

What changes were proposed in this pull request?

Add show tables as Table-valued function make user convenient to analysis db information in SQL

Why are the changes needed?

make user convenient to analysis db information in SQL

Does this PR introduce any user-facing change?

How was this patch tested?

Added UT

@github-actions github-actions bot added the SQL label Feb 7, 2021
@AngersZhuuuu AngersZhuuuu marked this pull request as draft February 7, 2021 07:29
@SparkQA
Copy link

SparkQA commented Feb 7, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 7, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 7, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 7, 2021

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

@AngersZhuuuu AngersZhuuuu marked this pull request as ready for review February 7, 2021 08:35
@SparkQA
Copy link

SparkQA commented Feb 7, 2021

Test build #134983 has finished for PR 31504 at commit 4583f25.

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

@SparkQA
Copy link

SparkQA commented Feb 7, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 7, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 7, 2021

Test build #134980 has finished for PR 31504 at commit 6d8e763.

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

@SparkQA
Copy link

SparkQA commented Feb 7, 2021

Test build #134988 has finished for PR 31504 at commit 3f42e91.

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

@AngersZhuuuu
Copy link
Contributor Author

retest this please

@AngersZhuuuu
Copy link
Contributor Author

ok to test

Range(start, end, step, Some(numPartitions))
}),

"show_namespaces" -> Map(
Copy link
Member

Choose a reason for hiding this comment

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

Please also update

title: Table-valued Functions (TVF)

}),

"show_namespaces" -> Map(
/* show_namespaces() */
Copy link
Member

Choose a reason for hiding this comment

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

This implementation will add a lot of TVFs. How about just add one TVF, something like this:

SELECT * FROM SELECT_FROM_COMMAND('show_namespaces') WHERE identifier='a' AND pattern = 'b';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This implementation will add a lot of TVFs. How about just add one TVF, something like this:

SELECT * FROM SELECT_FROM_COMMAND('show_namespaces') WHERE identifier='a' AND pattern = 'b';

In this way its hard to fit where condition to command. and always fetch all data then filter?

If it's show tables, we can't directly filter data in metadata level.

@SparkQA
Copy link

SparkQA commented Feb 8, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 8, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 8, 2021

Test build #134996 has finished for PR 31504 at commit 3f42e91.

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

@SparkQA
Copy link

SparkQA commented Feb 8, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 8, 2021

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

@SparkQA
Copy link

SparkQA commented Feb 8, 2021

Test build #135008 has finished for PR 31504 at commit 5e32ffd.

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

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Do other DBMSs support this as a built-in show_columns function? If then, could you update the PR description by adding those references?

@AngersZhuuuu
Copy link
Contributor Author

Do other DBMSs support this as a built-in show_columns function? If then, could you update the PR description by adding those references?

after a long time search, no other DBMS support this kind of functions. But it's really helpful for data analysis user to have a better insight for metadata.

@github-actions
Copy link

github-actions bot commented Jun 9, 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 Jun 9, 2021
@github-actions github-actions bot closed this Jun 11, 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