Skip to content

Verify ARRAY type handling: add mock and integration tests (legacy #159)#50

Open
HenryNebula wants to merge 1 commit intodevfrom
worktree-triage+159-array-type
Open

Verify ARRAY type handling: add mock and integration tests (legacy #159)#50
HenryNebula wants to merge 1 commit intodevfrom
worktree-triage+159-array-type

Conversation

@HenryNebula
Copy link
Copy Markdown
Owner

Summary

Fixes #49: Verify JDBC ARRAY type (2003) is handled correctly via ExplicitTypeMapper's VARCHAR fallback.

Legacy issue baztian/jaydebeapi#159 reported that ARRAY columns returned raw Java objects. In our codebase, ExplicitTypeMapper already degrades ARRAY to VARCHAR (toString representation), returning Python strings. This PR adds regression tests to verify this behavior.

Changes

  • Add ARRAY case to mockType() in MockConnection.java, mocking getString() for the VARCHAR fallback path
  • Add mock test verifying ARRAY columns return Python strings
  • Remove ARRAY from _ARROW_UNSUPPORTED_TYPES in test_mock.py
  • Add HSQLDB integration test for ARRAY column reads

Test plan

  • Added mock test reproducing the ARRAY type path
  • Added HSQLDB integration test for ARRAY columns
  • Verified fix passes with CLASSPATH="test/jars/*:test/mock-jars/*" uv run python -m unittest test.test_mock
  • Verified fix passes with CLASSPATH="test/jars/*" uv run python -m unittest test.test_integration.HsqldbTest

Closes #49

Generated with Claude Code

JDBC ARRAY columns are handled via ExplicitTypeMapper's VARCHAR fallback
(toString representation). Add mock driver ARRAY support and regression
tests to verify this degraded path works correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HenryNebula HenryNebula force-pushed the worktree-triage+159-array-type branch from 664374c to d2aedcf Compare April 28, 2026 13:05
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.

1 participant