Skip to content

fix(rdb): 修复 PostgreSQL int2 类型映射#112

Merged
zhou-hao merged 1 commit into
4.2from
fix/postgresql-int2-short-mapping
May 27, 2026
Merged

fix(rdb): 修复 PostgreSQL int2 类型映射#112
zhou-hao merged 1 commit into
4.2from
fix/postgresql-int2-short-mapping

Conversation

@zhou-hao
Copy link
Copy Markdown
Member

概述

  • 修复 PostgreSQL 方言中 int2 被错误映射为 Byte.class 的问题
  • int2 调整为 Short.class
  • 补充 PostgresqlArraySupportTest 回归测试,验证 int2 列类型映射结果

背景

在上层 retrieval 的 binding 模式大样本验证中,smallint/int2 标签值如 1000 被写成 -24,导致:

  • 标签精准筛选准确率异常
  • 向量 + 标签 + 全文混合检索准确率异常

根因定位到 PostgresqlDialectint2 的 Java 类型注册错误。

验证

已本地执行:

mvn -Dsurefire.failIfNoSpecifiedTests=false -Dtest=PostgresqlArraySupportTest -pl hsweb-easy-orm-rdb -am test

结果:

  • PostgresqlArraySupportTest: 4 passed

影响

  • 修复 PostgreSQL smallint/int2 数值列在 easy-orm 下的类型映射
  • 对依赖该映射的上层模块(如 retrieval-pg 的绑定表标签写入/读取)生效

@zhou-hao zhou-hao changed the base branch from master to 4.2 May 26, 2026 15:20
@zhou-hao zhou-hao force-pushed the fix/postgresql-int2-short-mapping branch from d574103 to 07b6515 Compare May 26, 2026 15:26
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.22%. Comparing base (68b2764) to head (07b6515).
⚠️ Report is 45 commits behind head on 4.2.

Additional details and impacted files
@@              Coverage Diff              @@
##                4.2     #112       +/-   ##
=============================================
+ Coverage     64.92%   79.22%   +14.29%     
- Complexity     2341     3337      +996     
=============================================
  Files           343      373       +30     
  Lines          9375    10761     +1386     
  Branches        940     1278      +338     
=============================================
+ Hits           6087     8525     +2438     
+ Misses         2810     1616     -1194     
- Partials        478      620      +142     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zhou-hao zhou-hao merged commit 3c9fb55 into 4.2 May 27, 2026
1 check 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.

2 participants