-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-34172][SQL] Add SHOW DATABASES as table-valued function
#31504
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
|
Kubernetes integration test starting |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Kubernetes integration test status success |
|
Test build #134983 has finished for PR 31504 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #134980 has finished for PR 31504 at commit
|
|
Test build #134988 has finished for PR 31504 at commit
|
|
retest this please |
|
ok to test |
| Range(start, end, step, Some(numPartitions)) | ||
| }), | ||
|
|
||
| "show_namespaces" -> Map( |
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.
Please also update
| title: Table-valued Functions (TVF) |
| }), | ||
|
|
||
| "show_namespaces" -> Map( | ||
| /* show_namespaces() */ |
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.
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';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.
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.
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #134996 has finished for PR 31504 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #135008 has finished for PR 31504 at commit
|
dongjoon-hyun
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.
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. |
|
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. |
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