-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-30352][SQL] DataSourceV2: Add CURRENT_CATALOG function #27006
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
Changes from 1 commit
180fe0a
dd9f417
c7b82d5
2c32f98
f4f8fbe
fa520d1
f951b5e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -130,6 +130,7 @@ abstract class Optimizer(catalogManager: CatalogManager) | |
| ReplaceExpressions, | ||
| ComputeCurrentTime, | ||
| GetCurrentDatabase(catalogManager), | ||
| GetCurrentCatalog(catalogManager), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we merge the above 2 rules into one? |
||
| RewriteDistinctAggregates, | ||
| ReplaceDeduplicateWithAggregate) :: | ||
| ////////////////////////////////////////////////////////////////////////////////////////// | ||
|
|
@@ -220,6 +221,7 @@ abstract class Optimizer(catalogManager: CatalogManager) | |
| ReplaceExpressions.ruleName :: | ||
| ComputeCurrentTime.ruleName :: | ||
| GetCurrentDatabase(catalogManager).ruleName :: | ||
| GetCurrentCatalog(catalogManager).ruleName :: | ||
| RewriteDistinctAggregates.ruleName :: | ||
| ReplaceDeduplicateWithAggregate.ruleName :: | ||
| ReplaceIntersectWithSemiJoin.ruleName :: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,6 @@ select typeof(cast(1.0 as float)), typeof(1.0D), typeof(1.2); | |
| select typeof(date '1986-05-23'), typeof(timestamp '1986-05-23'), typeof(interval '23 days'); | ||
| select typeof(x'ABCD'), typeof('SPARK'); | ||
| select typeof(array(1, 2)), typeof(map(1, 2)), typeof(named_struct('a', 1, 'b', 'spark')); | ||
|
|
||
| -- get current_catalog | ||
| select current_catalog(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we have a sql testing file for
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. checked and not found
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how about we add a
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am okay with it. |
||
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.
it's too late for 3.0 now. let's change it to
3.1.0