-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Simplify making information_schame tables #10420
Simplify making information_schame tables #10420
Conversation
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.
LGTM! Thanks @lewiszlw
INFORMATION_SCHEMA_TABLES | ||
.iter() | ||
.map(|t| t.to_string()) | ||
.collect() | ||
} | ||
|
||
async fn table( | ||
&self, | ||
name: &str, | ||
) -> Result<Option<Arc<dyn TableProvider>>, DataFusionError> { |
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.
Not related to this PR but do we need Result in return 🤔
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.
I think it is related to the fact this is in the implementation of the SchemaProvider
trait
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.
Thanks @lewiszlw please take care on case insensitive comment
I am surprised that this pr passed the tests, how about adding some tests for it? |
I added a test in slt. |
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.
INFORMATION_SCHEMA_TABLES | ||
.iter() | ||
.map(|t| t.to_string()) | ||
.collect() | ||
} | ||
|
||
async fn table( | ||
&self, | ||
name: &str, | ||
) -> Result<Option<Arc<dyn TableProvider>>, DataFusionError> { |
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.
I think it is related to the fact this is in the implementation of the SchemaProvider
trait
* Simplify making information_schame tables * Simplify InformationSchemaProvider * Remove lifetime annotation * Replace if with match * case insensitive * Add test
Which issue does this PR close?
Simplify making information_schame tables and avoid potential bug that someone forgets adding logic for new table here.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?