The KING of Reverts#1598
Merged
Merged
Conversation
… deprecation of old constants"" This reverts commit 63ecf8a.
…Mode` enumeration and refine database handling"" This reverts commit 0037070.
Polished the `H2` compatibility `Mode` enum with improved formatting and readability. Addressed minor import reorganizations, streamlined `toDbType` and `fromDbType` methods, and fixed consistency in error messages. Updated tests and utilities accordingly.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors H2 database compatibility mode handling by introducing an enum-based approach to replace the previous dialect-based system. The changes enable better support for H2's Regular (native) mode and improve mode detection from both JDBC URLs and active connections.
Key changes:
- Introduced
H2.Modeenum to represent H2 compatibility modes (Regular, MySQL, PostgreSQL, MSSQLServer, MariaDB) - Refactored mode detection to query the active H2 connection's
INFORMATION_SCHEMA.SETTINGS - Added comprehensive tests for all supported H2 modes and unsupported mode error handling
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| docs/StardustDocs/topics/dataSources/sql/H2.md | Added documentation and code examples for H2 compatibility modes |
| dataframe-jdbc/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/db/H2.kt | Introduced Mode enum, deprecated old constructor, refactored delegate handling for null mode |
| dataframe-jdbc/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/db/util.kt | Extracted and refactored H2 mode parsing logic into helper functions, improved connection-based mode detection |
| dataframe-jdbc/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io/h2/h2Test.kt | Added tests for all H2 compatibility modes and unsupported mode error cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
koperagen
reviewed
Dec 1, 2025
koperagen
requested changes
Dec 1, 2025
Collaborator
koperagen
left a comment
There was a problem hiding this comment.
All good, please answer tiny question above and fix the build: apiDump and linter maybe
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.
Closes #1595