Repository navigation
chore(examples): implement display_name in the temperature extension type example - #27942
Open
tschwarzinger wants to merge 3 commits into
Open
tschwarzinger wants to merge 3 commits into
tschwarzinger wants to merge 3 commits into
Conversation
tschwarzinger
commented
Dec 2, 2026
| } | ||
|
|
||
| fn display_name(&self) -> Option<Cow<'_, str>> { | ||
| Some(Cow::Borrowed("TEMPERATURE")) |
Contributor
Author
There was a problem hiding this comment.
We could also print CELSIUS / FAHRENHEIT / KELVIN here if you think that's better
Member
There was a problem hiding this comment.
TEMPERATURE(°C) wouldn't hurt, but it's just an example 😁
Contributor
Author
tschwarzinger
commented
Dec 2, 2026
| register_temperature_table(&ctx).await?; | ||
|
|
||
| // Print the schema of the example table | ||
| ctx.sql("DESCRIBE example").await?.show().await?; |
Contributor
Author
There was a problem hiding this comment.
Running this in the demo is optional I think. The test is still a good idea I believe.
sdf-jkl
approved these changes
Dec 3, 2026
| } | ||
|
|
||
| fn display_name(&self) -> Option<Cow<'_, str>> { | ||
| Some(Cow::Borrowed("TEMPERATURE")) |
Member
There was a problem hiding this comment.
TEMPERATURE(°C) wouldn't hurt, but it's just an example 😁
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
None, just a small addition to an example.
Rationale for this change
While reviewing #26822 I saw that #26866 has been closed which I found great! 🥳
This PR adds the feature from #26866 to the temperature extension type example. For now, I've only added it to the tests. I can also add the describe query to the example's "main" if you think it helps.
What changes are included in this PR?
DFExtensionType::display_nameforTemperatureExtensionTypeWhat is the testing strategy for this PR?
DESCRIBEhttps://github.com/tschwarzinger/datafusion/actions/runs/46833480641
Manual Run:
Are there any user-facing changes?