Skip to content

fix: Handle JDBC Types.OTHER (1111) without warning#3995

Merged
xerial merged 2 commits intomainfrom
copilot/fix-3994
Jul 21, 2025
Merged

fix: Handle JDBC Types.OTHER (1111) without warning#3995
xerial merged 2 commits intomainfrom
copilot/fix-3994

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jul 21, 2025

This PR fixes the issue where JDBC type 1111 (Types.OTHER) generates an unnecessary warning message when processed by JDBCCodec.

Problem

When JDBCCodec encounters JDBC type 1111 (Types.OTHER), it falls through to the default case which logs a warning:

Unsupported JDBC type: 1111. Assume string type  - (JDBCCodec.scala:176)

Types.OTHER is a standard JDBC type used for database-specific types that don't fit into standard SQL types, so this warning is misleading and creates noise in logs.

Solution

Added an explicit case for Types.OTHER in the toJDBCColumnCodec method to map it directly to JDBCStringCodec without generating a warning. This maintains the existing behavior (treating it as a string) while eliminating the unnecessary warning.

case Types.OTHER => JDBCStringCodec

Changes

  • JDBCCodec.scala: Added explicit handling for Types.OTHER (1111)
  • JDBCCodecTest.scala: Added test to verify Types.OTHER is handled correctly without warnings

Testing

  • All existing tests pass (129 passed, 2 pending, 0 failed)
  • New test confirms Types.OTHER maps to JDBCStringCodec without warnings
  • Verified no warning messages are generated for type 1111

The fix is minimal and surgical - only one line added to handle this specific JDBC type while preserving all existing functionality.

Fixes #3994.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] bug: Unsupported JDBC type: 1111. Assume string type - (JDBCCodec.scala:176) fix: Handle JDBC Types.OTHER (1111) without warning Jul 21, 2025
Copilot AI requested a review from xerial July 21, 2025 20:24
@xerial xerial marked this pull request as ready for review July 21, 2025 21:34
@xerial xerial merged commit 7310fba into main Jul 21, 2025
39 checks passed
@xerial xerial deleted the copilot/fix-3994 branch July 21, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Unsupported JDBC type: 1111. Assume string type - (JDBCCodec.scala:176)

2 participants