Skip to content

importDataSchema() notebooks fix#1714

Merged
Jolanrensen merged 1 commit intomasterfrom
importDataSchema-fix1
Mar 10, 2026
Merged

importDataSchema() notebooks fix#1714
Jolanrensen merged 1 commit intomasterfrom
importDataSchema-fix1

Conversation

@Jolanrensen
Copy link
Copy Markdown
Collaborator

Fixes #1570

Made unsupported functions in Jdbc throw exceptions instead of errors. Improved error message for importDataSchema() in notebooks. Removed unused importDataSchema: String

…. Improved error message for importDataSchema() in notebooks. Removed unused `importDataSchema: String`
@Jolanrensen Jolanrensen requested a review from zaleslaw February 25, 2026 15:26
@Jolanrensen Jolanrensen added bug Something isn't working Tooling Kotlin Notebook, Jupyter, Colab labels Feb 25, 2026
is CodeGenerationReadResult.Error -> {
execute(
"""DISPLAY("Failed to read data schema from ${importDataSchema.url}: ${codeGenResult.reason}")""",
display(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you please attach a screenshot?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!
Maybe remove SupportedCodeGenerationFormat interface from Jdbc while it's not implemented? Available formats: ... looks misleading

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

hmm, that might be an idea. @zaleslaw Are you okay with this? It's not possible to generate dataschema interfaces for JDBC without KSP/gradle after all, right? (also in notebooks, it's not possible to generate just types for jdbc, right?)

@Jolanrensen
Copy link
Copy Markdown
Collaborator Author

@zaleslaw I'll merge it in its current state so the bug is solved. We'll decide whether to remove the SupportedCodeGenerationFormat supertype from the Jdbc class as a part of #450 or #1681

@Jolanrensen Jolanrensen merged commit 44871e7 into master Mar 10, 2026
5 checks passed
@zaleslaw
Copy link
Copy Markdown
Collaborator

@Jolanrensen, I agree with the proposed way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Tooling Kotlin Notebook, Jupyter, Colab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling importDataSchema() without enableExperimentalOpenApi provides unhelpful exception

3 participants