Skip to content

Conversation

@zaleslaw
Copy link
Collaborator

@zaleslaw zaleslaw commented Nov 26, 2025

Fixes #1220 + some discovered bugs regarding type mappings

…MariaDB driver, improve fallback mechanisms for unsupported JDBC metadata methods, and update relevant tests.
@zaleslaw
Copy link
Collaborator Author

@copilot make a review of fallback mechanism from the point of supporting some JDBC sources which are not supported yet

Copy link

Copilot AI commented Nov 26, 2025

@zaleslaw I've opened a new pull request, #1589, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot finished reviewing on behalf of zaleslaw November 26, 2025 16:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances JDBC metadata reading robustness by adding comprehensive fallback mechanisms for drivers that don't fully implement JDBC metadata methods (e.g., Apache Hive), and fixes MariaDB-specific type mapping issues for BIGINT and unsigned integer types.

Key Changes:

  • Added graceful fallbacks in getTableColumnsMetadata() for all ResultSetMetaData methods that may throw SQLFeatureNotSupportedException
  • Fixed MariaDB type mappings to ensure BIGINT and unsigned integers always map to Long type, addressing driver inconsistencies
  • Improved test robustness with proper resource cleanup using .use {} blocks and consistent table naming

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
dataframe-jdbc/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/db/DbType.kt Added comprehensive exception handling fallbacks for JDBC metadata retrieval methods (catalog, schema, column names, types, nullability) and updated documentation to reflect fallback behavior
dataframe-jdbc/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/db/MariaDb.kt Added explicit type mapping rules for BIGINT and unsigned integer types (INTEGER UNSIGNED, INT UNSIGNED) to consistently map to Long, fixing driver-reported type inconsistencies
dataframe-jdbc/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io/local/mariadbTest.kt Updated test assertion to expect ByteArray instead of Blob for TINYBLOB columns, aligning with corrected type mapping
dataframe-jdbc/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io/commonTestScenarios.kt Refactored test to use constant for table name, added proper cleanup with DROP TABLE IF EXISTS, and improved resource management with .use {} blocks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@zaleslaw zaleslaw merged commit 95c575a into master Nov 27, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

table name could not be available for Kotlin dataframe JDBC

3 participants